Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Effects (Soft shadow / Blur / Glow) on UI elements

Discussion in '2D' started by gilamran, Dec 11, 2017.

  1. gilamran

    gilamran

    Joined:
    Jun 30, 2013
    Posts:
    15
    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!
     
  2. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,802
    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.
     
  3. gilamran

    gilamran

    Joined:
    Jun 30, 2013
    Posts:
    15
    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?
     
  4. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,802
  5. hasanbayat

    hasanbayat

    Joined:
    Oct 18, 2016
    Posts:
    627
    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: https://github.com/mob-sakai/UIEffect

    Hope this helps.
    Thanks.
     
  6. soumen

    soumen

    Joined:
    Jul 8, 2013
    Posts:
    8
    Thanks for sharing this great asset with us...
     
  7. skrishna

    skrishna

    Joined:
    Sep 18, 2014
    Posts:
    17
    Hem, the soft shadow feature is basically so limited that it's useless. FYI
     
    N00MKRAD likes this.
  8. jasonrbrock

    jasonrbrock

    Joined:
    May 22, 2019
    Posts:
    13
    @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 :D :D :D :D
     
    roberto_zangaro likes this.
  9. ken_unity779

    ken_unity779

    Joined:
    Sep 19, 2020
    Posts:
    2
    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.
     
    jamestrue and lorenzofman2 like this.