Fix shader that borderline allow mix_color.
TRICK)
If you want to make contnet to be transperent and draw borderline only,
1. check OPACITY is bigger than 0.01f
2. make borderlineColor's alpha value bigger than 1.0f
Change-Id: I424c1af86d6dad64b19c8cf57bb3f5979a3e5b58
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
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
void main()
{
- lowp vec4 targetColor = vec4(mixColor, 1.0) * uColor;
+ lowp vec4 targetColor = vec4(mixColor, 1.0);
#if IS_REQUIRED_BLUR || 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 = targetColor;
+ OUT_COLOR = targetColor * uColor;
return;
}
PreprocessPotential();
#if !IS_REQUIRED_BLUR && IS_REQUIRED_BORDERLINE
targetColor = convertBorderlineColor(targetColor);
#endif
- OUT_COLOR = targetColor;
+ OUT_COLOR = targetColor * uColor;
#if IS_REQUIRED_BLUR
mediump float opacity = calculateBlurOpacity();
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
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();
#if IS_REQUIRED_BORDERLINE
textureColor = convertBorderlineColor(textureColor);
#endif
- OUT_COLOR = textureColor;
+ OUT_COLOR = textureColor * uColor;
#if IS_REQUIRED_ROUNDED_CORNER
mediump float opacity = calculateCornerOpacity();
// potential is in texture range
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
mediump vec2 texCoord = vTexCoord;
#endif
- lowp vec4 textureColor = TEXTURE( sTexture, texCoord ) * uColor * vec4( mixColor, 1.0 );
+ lowp vec4 textureColor = TEXTURE( sTexture, texCoord ) * vec4( mixColor, 1.0 );
#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();
#if IS_REQUIRED_BORDERLINE
textureColor = convertBorderlineColor(textureColor);
#endif
- OUT_COLOR = textureColor;
+ OUT_COLOR = textureColor * uColor;
#if IS_REQUIRED_ROUNDED_CORNER
mediump float opacity = calculateCornerOpacity();