[1,["d6V4WlwVxJFY2zWf1ta+L1"],["_effectAsset"],[["cc.Material",["_name","_techniqueData"],2,11],["cc.EffectAsset",["_name","shaders","techniques"],0]],[[0,0,1,2],[1,0,1,2,4]],[[[[0,"out",[{},"0",11,[{"defines":{"USE_TEXTURE":true}},"props",11,[{"width":1,"height":1,"round":0.5},"size",8,[0,102,102]]]]]],0,0,[0],[0],[0]],[[[1,"out",[{"hash":1099474120,"record":null,"name":"out|vs|fs","glsl3":{"vert":"\nprecision highp float;\nuniform CCGlobal {\n  mat4 cc_matView;\n  mat4 cc_matViewInv;\n  mat4 cc_matProj;\n  mat4 cc_matProjInv;\n  mat4 cc_matViewProj;\n  mat4 cc_matViewProjInv;\n  vec4 cc_cameraPos;\n  vec4 cc_time;\n  mediump vec4 cc_screenSize;\n  mediump vec4 cc_screenScale;\n};\nin vec3 a_position;\nin vec2 a_uv0;\nin vec4 a_color;\nout vec2 v_uv0;\nout vec4 v_color;\nvoid main () {\n  gl_Position = cc_matViewProj * vec4(a_position, 1);\n  v_uv0 = a_uv0;\n  v_color = a_color;\n}","frag":"\nprecision highp float;\nin vec2 v_uv0;\nin vec4 v_color;\n#if USE_TEXTURE\nuniform sampler2D texture;\n#endif\nuniform Properties {\n  vec2 center;\n  vec2 size;\n  float width;\n  float height;\n  float round;\n  float feather;\n};\nvoid main () {\n  vec4 color = v_color;\n   #if USE_TEXTURE\n  color *= texture(texture, v_uv0);\n    #endif\n  float x = v_uv0.x;\n  float y = v_uv0.y;\n  float ratio = size.x / size.y;\n  float minX = center.x - (width / 2.0);\n  float maxX = center.x + (width / 2.0);\n  float minY = center.y - (height * ratio / 2.0);\n  float maxY = center.y + (height * ratio / 2.0);\n  if (x >= minX && x <= maxX && y >= minY && y <= maxY) {\n    if (round == 0.0) discard;\n    float roundY = round * ratio;\n    vec2 vertex;\n    if (x <= minX + round) {\n      if (y <= minY + roundY) {\n        vertex = vec2(minX + round, (minY + roundY) / ratio);\n      } else if (y >= maxY - roundY) {\n        vertex = vec2(minX + round, (maxY - roundY) / ratio);\n      } else {\n        vertex = vec2(minX + round, y / ratio);\n      }\n    } else if (x >= maxX - round) {\n      if (y <= minY + roundY){\n        vertex = vec2(maxX - round, (minY + roundY) / ratio);\n      } else if (y >= maxY - roundY) {\n        vertex = vec2(maxX - round, (maxY - roundY) / ratio);\n      } else {\n        vertex = vec2(maxX - round, y / ratio);\n      }\n    } else if (y <= minY + roundY) {\n      vertex = vec2(x, (minY + roundY) / ratio);\n    } else if (y >= maxY - roundY) {\n      vertex = vec2(x, (maxY - roundY) / ratio);\n    } else {\n      discard;\n    }\n    float dis = distance(vec2(x, y / ratio), vertex);\n    color.a = smoothstep(round - feather, round, dis) * color.a;\n  }\n  color.a *= v_color.a;\n  gl_FragColor = color;\n}"},"glsl1":{"vert":"\nprecision highp float;\nuniform mat4 cc_matViewProj;\nattribute vec3 a_position;\nattribute vec2 a_uv0;\nattribute vec4 a_color;\nvarying vec2 v_uv0;\nvarying vec4 v_color;\nvoid main () {\n  gl_Position = cc_matViewProj * vec4(a_position, 1);\n  v_uv0 = a_uv0;\n  v_color = a_color;\n}","frag":"\nprecision highp float;\nvarying vec2 v_uv0;\nvarying vec4 v_color;\n#if USE_TEXTURE\nuniform sampler2D texture;\n#endif\nuniform vec2 center;\nuniform vec2 size;\nuniform float width;\nuniform float height;\nuniform float round;\nuniform float feather;\nvoid main () {\n  vec4 color = v_color;\n   #if USE_TEXTURE\n  color *= texture2D(texture, v_uv0);\n    #endif\n  float x = v_uv0.x;\n  float y = v_uv0.y;\n  float ratio = size.x / size.y;\n  float minX = center.x - (width / 2.0);\n  float maxX = center.x + (width / 2.0);\n  float minY = center.y - (height * ratio / 2.0);\n  float maxY = center.y + (height * ratio / 2.0);\n  if (x >= minX && x <= maxX && y >= minY && y <= maxY) {\n    if (round == 0.0) discard;\n    float roundY = round * ratio;\n    vec2 vertex;\n    if (x <= minX + round) {\n      if (y <= minY + roundY) {\n        vertex = vec2(minX + round, (minY + roundY) / ratio);\n      } else if (y >= maxY - roundY) {\n        vertex = vec2(minX + round, (maxY - roundY) / ratio);\n      } else {\n        vertex = vec2(minX + round, y / ratio);\n      }\n    } else if (x >= maxX - round) {\n      if (y <= minY + roundY){\n        vertex = vec2(maxX - round, (minY + roundY) / ratio);\n      } else if (y >= maxY - roundY) {\n        vertex = vec2(maxX - round, (maxY - roundY) / ratio);\n      } else {\n        vertex = vec2(maxX - round, y / ratio);\n      }\n    } else if (y <= minY + roundY) {\n      vertex = vec2(x, (minY + roundY) / ratio);\n    } else if (y >= maxY - roundY) {\n      vertex = vec2(x, (maxY - roundY) / ratio);\n    } else {\n      discard;\n    }\n    float dis = distance(vec2(x, y / ratio), vertex);\n    color.a = smoothstep(round - feather, round, dis) * color.a;\n  }\n  color.a *= v_color.a;\n  gl_FragColor = color;\n}"},"builtins":{"globals":{"blocks":[{"name":"CCGlobal","defines":[]}],"samplers":[]},"locals":{"blocks":[],"samplers":[]}},"defines":[{"name":"USE_TEXTURE","type":"boolean","defines":[]}],"blocks":[{"name":"Properties","binding":0,"members":[{"name":"center","type":14,"count":1},{"name":"size","type":14,"count":1},{"name":"width","type":13,"count":1},{"name":"height","type":13,"count":1},{"name":"round","type":13,"count":1},{"name":"feather","type":13,"count":1}],"defines":[]}],"samplers":[{"name":"texture","type":29,"count":1,"binding":30,"defines":["USE_TEXTURE"]}]}],[{"passes":[{"program":"out|vs|fs","blendState":{"targets":[{"blend":true}]},"rasterizerState":{"cullMode":0},"properties":{"size":{"type":14,"value":[500,500],"editor":{"tooltip":"节点尺寸"}},"center":{"type":14,"value":[0.5,0.5],"editor":{"tooltip":"中心点 (左上角为原点)"}},"width":{"type":13,"value":[0.5],"editor":{"tooltip":"宽 (目标宽度 / 节点宽度)"}},"height":{"type":13,"value":[0.5],"editor":{"tooltip":"高 (目标高度 / 节点宽度)"}},"round":{"type":13,"value":[0.1],"editor":{"tooltip":"圆角半径 (目标半径 / 节点宽度)"}},"feather":{"type":13,"value":[0.05],"editor":{"tooltip":"边缘虚化宽度"}}}}]}]]],0,0,[],[],[]]]]