Fix cutout outside don't add inner-margin 11/318611/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 21 Jan 2025 06:07:57 +0000 (15:07 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 21 Jan 2025 07:20:28 +0000 (16:20 +0900)
Change-Id: I0665971a7748253735ff9c00ae3204b00629fde1
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-toolkit/internal/graphics/shaders/color-visual-shader.frag

index c0eb82381518a665a36fba170af4799652d40afa..a51711b6aa73ec867ede223c166682cd3e9bf428 100644 (file)
@@ -407,8 +407,8 @@ void main()
       PreprocessPotential(vCutoutCornerRadius, vPositionFromCenter, uSize.xy * 0.5, 0.0);
 
       // Decrease potential range, to avoid alias make some hole.
-      gMinOutlinePotential -= gPotentialRange * 0.5;
-      gMaxOutlinePotential -= gPotentialRange * 0.5;
+      gMinOutlinePotential += gPotentialRange * ((float)uCutoutOutside - 0.5);
+      gMaxOutlinePotential += gPotentialRange * ((float)uCutoutOutside - 0.5);
 
       discardOpacity = smoothstep(gMinOutlinePotential, gMaxOutlinePotential, gPotential);
     }