Extending Style - Adding Strikethrough
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / graphics / shaders / text-visual-multi-color-text-with-style-shader.frag
1 varying mediump vec2 vTexCoord;
2 uniform sampler2D sTexture;
3 uniform sampler2D sStyle;
4 uniform sampler2D sOverlayStyle;
5 uniform lowp vec4 uColor;
6 uniform lowp vec3 mixColor;
7
8 void main()
9 {
10   mediump vec4 textTexture = texture2D( sTexture, vTexCoord );
11   mediump vec4 styleTexture = texture2D( sStyle, vTexCoord );
12   mediump vec4 overlayStyleTexture = texture2D( sOverlayStyle, vTexCoord );
13
14   // Draw the text as overlay above the style
15   gl_FragColor = ( overlayStyleTexture + textTexture * (1.0 - overlayStyleTexture.a) + styleTexture * ( 1.0 - textTexture.a ) * (1.0 - overlayStyleTexture.a) ) * uColor * vec4( mixColor, 1.0 );
16 }