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=f859a24a1ffe9660c8cd8439a38b8ca6835e6b09;hp=9c897b4dcd34f0d4974aedf19224aac869d71b6f;hb=f4b327350bf7873847f8f08bb27d11361f60f759;hpb=ec516c6d57ca74d1916a2160910699f34cd51f59 diff --git a/dali-toolkit/internal/graphics/shaders/gradient-visual-shader.frag b/dali-toolkit/internal/graphics/shaders/gradient-visual-shader.frag index 9c897b4..f859a24 100644 --- a/dali-toolkit/internal/graphics/shaders/gradient-visual-shader.frag +++ b/dali-toolkit/internal/graphics/shaders/gradient-visual-shader.frag @@ -139,8 +139,9 @@ lowp vec4 convertBorderlineColor(lowp vec4 textureColor) textureColor = mix(textureColor, vec4(borderlineColor.xyz, 0.0), smoothstep(MinTexturelinePotential, MaxTexturelinePotential, potential)); } borderlineOpacity *= borderlineColor.a; + return mix(textureColor, vec4(borderlineColor.xyz, 1.0), borderlineOpacity); } - return mix(textureColor, vec4(borderlineColor.xyz, 1.0), borderlineOpacity); + return mix(textureColor, borderlineColor, borderlineOpacity); } #endif @@ -169,16 +170,16 @@ mediump float calculateCornerOpacity() void main() { #if RADIAL - lowp vec4 textureColor = TEXTURE(sTexture, vec2(length(vTexCoord), 0.5)) * vec4(mixColor, 1.0) * uColor; + lowp vec4 textureColor = TEXTURE(sTexture, vec2(length(vTexCoord), 0.5)) * vec4(mixColor, 1.0); #else - lowp vec4 textureColor = TEXTURE(sTexture, vec2(vTexCoord.y, 0.5)) * vec4(mixColor, 1.0) * uColor; + lowp vec4 textureColor = TEXTURE(sTexture, vec2(vTexCoord.y, 0.5)) * vec4(mixColor, 1.0); #endif #if IS_REQUIRED_ROUNDED_CORNER || IS_REQUIRED_BORDERLINE // skip most potential calculate for performance if(abs(vPosition.x) < vOptRectSize.x && abs(vPosition.y) < vOptRectSize.y) { - OUT_COLOR = textureColor; + OUT_COLOR = textureColor * uColor; return; } PreprocessPotential(); @@ -187,7 +188,7 @@ void main() #if IS_REQUIRED_BORDERLINE textureColor = convertBorderlineColor(textureColor); #endif - OUT_COLOR = textureColor; + OUT_COLOR = textureColor * uColor; #if IS_REQUIRED_ROUNDED_CORNER mediump float opacity = calculateCornerOpacity();