Hi,
Is it possible to create (Flash like) soft shadows on 2D UI elements?
I’m not looking for Text only (TextMesh Pro), but to be able to do it for buttons / images etc.
Thanks!
Hi,
Is it possible to create (Flash like) soft shadows on 2D UI elements?
I’m not looking for Text only (TextMesh Pro), but to be able to do it for buttons / images etc.
Thanks!
Currently there is only the Shadow component, which is a hard shadow. You can make your own shadows with sprites, or create a shader that will do it.
The current Shadow is hard, yea. if only I could apply blur to it…
BTW: Is there a way to see how Unity implemented it?
Luckily for you, that script is open source here:
I wouldn’t know how to go about adding a blur to that, but there it is. ![]()
I know it is an Old thread, but sharing this to those who are coming through search engines or such.
There are lots of great UI effects over here: GitHub - mob-sakai/UIEffect: UIEffect is an effect component for uGUI element in Unity. Let's decorate your UI with effects!
Hope this helps.
Thanks.
Thanks for sharing this great asset with us…
Hem, the soft shadow feature is basically so limited that it’s useless. FYI
@hasanbayat ur a legend for sharing that Github address … and mob-sakai? we owe you beers.
UIEffect Drop shadow works great on 2019.4 URP
![]()
Another late reply…
I use multiple hard shadows with alpha decreasing with distance to create a pleasing blur-like effect. I think it works quite well with three or four shadows, but you can use as many as you like. You can also fine tune by making the first two have somewhat different colors and horizontal/vertical bias, simulating shadow cast by multiple light sources.