+ gl_FragColor.a *= 1.0 - smoothstep( -1.0, 1.0, dist );\n
+ }\n
+);
+
+const char* VERTEX_SHADER_BLUR_EDGE = DALI_COMPOSE_SHADER(
+ attribute mediump vec2 aPosition;\n
+ uniform highp mat4 uMvpMatrix;\n
+ uniform mediump vec3 uSize;\n
+ varying mediump vec2 vPosition;\n
+ varying mediump vec2 vRectSize;\n
+ \n
+ //Visual size and offset
+ uniform mediump vec2 offset;\n
+ uniform mediump vec2 size;\n
+ uniform mediump vec4 offsetSizeMode;\n
+ uniform mediump vec2 origin;\n
+ uniform mediump vec2 anchorPoint;\n
+ uniform mediump float blurRadius;\n
+ \n
+ vec4 ComputeVertexPosition()\n
+ {\n
+ vec2 visualSize = mix(uSize.xy*size, size, offsetSizeMode.zw ) + blurRadius * 2.0;\n
+ vec2 visualOffset = mix( offset, offset/uSize.xy, offsetSizeMode.xy);\n
+ vRectSize = visualSize / 2.0;\n
+ vPosition = aPosition* visualSize;\n
+ return vec4( vPosition + anchorPoint*visualSize + (visualOffset + origin)*uSize.xy, 0.0, 1.0 );\n
+ }\n
+ \n
+ void main()\n
+ {\n
+ gl_Position = uMvpMatrix * ComputeVertexPosition();\n
+ }\n
+);
+
+const char* FRAGMENT_SHADER_BLUR_EDGE = DALI_COMPOSE_SHADER(
+ varying mediump vec2 vPosition;\n
+ varying mediump vec2 vRectSize;\n
+ uniform lowp vec4 uColor;\n
+ uniform lowp vec3 mixColor;\n
+ uniform mediump float blurRadius;\n
+ \n
+ void main()\n
+ {\n
+ mediump vec2 blur = 1.0 - smoothstep( vRectSize - blurRadius * 2.0, vRectSize, abs( vPosition ) );\n
+ gl_FragColor = uColor * vec4( mixColor, 1.0 );\n
+ gl_FragColor.a *= blur.x * blur.y;\n