DropShadowEffect makes path pixelated
Posted: 25 Sep 2023, 14:46
Hello,
I was playing around with Path and noticed that when applying DropShadowEffect it becomes pixelated. See attachments.
No shadow applied: With DropShadowEffect: xaml used:
Did I mess up with some configuration? I'm using URP
Thanks!
I was playing around with Path and noticed that when applying DropShadowEffect it becomes pixelated. See attachments.
No shadow applied: With DropShadowEffect: xaml used:
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Viewbox>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="50">
<Viewbox Width="300" Height="300">
<Viewbox.Effect>
<DropShadowEffect
BlurRadius="0"
Direction="128"
ShadowDepth="10"
Opacity="0.5"
Color="Black"/>
</Viewbox.Effect>
<Canvas Width="512" Height="512">
<Canvas.Resources>
<RadialGradientBrush x:Key="fill">
<GradientStop Offset="0" Color="#FF2892FC"/>
<GradientStop Offset="1" Color="#FF63B0FD"/>
</RadialGradientBrush>
</Canvas.Resources>
<Path Fill="{StaticResource fill}" Data="M484.512 143.416c-15.228-17.399-35.387-29.555-57.572-34.89 C411.459 52.307 360.013 12.5 300.91 12.5c-34.072 0-66.456 13.224-90.709 36.675c-14.924-8.461-31.718-12.88-49.262-12.88 c-51.057 0-93.635 38.84-99.477 88.547c-16.17 6.832-30.547 17.963-41.2 32.052C7.007 174.424 0 195.313 0 217.301 c0 55.28 44.932 100.254 100.159 100.254c14.055 0 27.91-2.987 40.71-8.718c27.378 31.324 67.337 49.687 109.289 49.687 c38.442 0 75.062-15.271 102.246-42.275c15.148 7.44 31.744 11.327 48.647 11.327c61.177 0 110.948-49.819 110.948-111.053 C512 189.633 502.238 163.67 484.512 143.416z"/>
<Path Fill="{StaticResource fill}" Data="M354 349.49c-30.327 0-55 24.675-55 55.004c0 30.329 24.673 55.004 55 55.004s55-24.675 55-55.004 C409 374.164 384.327 349.49 354 349.49z"/>
<Path Fill="{StaticResource fill}" Data="M467 409.494c-24.813 0-45 20.188-45 45.003s20.187 45.003 45 45.003s45-20.188 45-45.003 S491.813 409.494 467 409.494z"/>
</Canvas>
</Viewbox>
</StackPanel>
</Viewbox>
</Grid>Thanks!