summaryrefslogtreecommitdiff
path: root/shaders/skia/814.shader_test
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/skia/814.shader_test')
-rw-r--r--shaders/skia/814.shader_test156
1 files changed, 156 insertions, 0 deletions
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);
+}
+