X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fgraphics%2Fshaders%2Fgradient-visual-shader.frag;h=cb72c6778f7758010d42a56d21a497842c54b9b7;hp=f859a24a1ffe9660c8cd8439a38b8ca6835e6b09;hb=7c744c0ecb31b40289251e91fec97f7c0f45846f;hpb=b0faad981257720e1a5fb15af45647f30b669adf diff --git a/dali-toolkit/internal/graphics/shaders/gradient-visual-shader.frag b/dali-toolkit/internal/graphics/shaders/gradient-visual-shader.frag index f859a24..cb72c67 100644 --- a/dali-toolkit/internal/graphics/shaders/gradient-visual-shader.frag +++ b/dali-toolkit/internal/graphics/shaders/gradient-visual-shader.frag @@ -128,18 +128,19 @@ lowp vec4 convertBorderlineColor(lowp vec4 textureColor) mediump float tCornerRadius = -gCenterPosition; mediump float MaxTexturelinePotential = tCornerRadius + gPotentialRange; mediump float MinTexturelinePotential = tCornerRadius - gPotentialRange; + lowp vec3 BorderlineColorRGB = borderlineColor.xyz * borderlineColor.a; if(potential > MaxTexturelinePotential) { // potential is out of texture range. use borderline color instead of texture - textureColor = vec4(borderlineColor.xyz, 0.0); + textureColor = vec4(BorderlineColorRGB, 0.0); } else if(potential > MinTexturelinePotential) { // potential is in texture range - textureColor = mix(textureColor, vec4(borderlineColor.xyz, 0.0), smoothstep(MinTexturelinePotential, MaxTexturelinePotential, potential)); + textureColor = mix(textureColor, vec4(BorderlineColorRGB, 0.0), smoothstep(MinTexturelinePotential, MaxTexturelinePotential, potential)); } borderlineOpacity *= borderlineColor.a; - return mix(textureColor, vec4(borderlineColor.xyz, 1.0), borderlineOpacity); + return mix(textureColor, vec4(BorderlineColorRGB, 1.0), borderlineOpacity); } return mix(textureColor, borderlineColor, borderlineOpacity); }