Search Unity

Unity Experimental 2D Lights and Shader Graph support in LWRP

Discussion in '2D Experimental Preview' started by rustum, May 24, 2019.

  1. berkza

    berkza

    Joined:
    Oct 9, 2018
    Posts:
    3
    Hi! Is it planned for the 2D renderer to support "custom features" like the foward renderer does? I found this post from Erdroy https://forum.unity.com/threads/urp-2d-renderer-custom-feature.778946/ and was wondering if it was recommended to follow his steps and customize the renderer, because his PR seems to be in low priority. Thanks in advance, any reply will be helpfull.
     
  2. ShinKazuo

    ShinKazuo

    Joined:
    Oct 28, 2014
    Posts:
    12
    Hey friends, I have a question about the shadow caster 2D script, didn't find the answer through the
    Currently I have a player character that is a circle but when it attacks it turns into an ellipse. Is there a way for the shadow to be created relative to the sprite shape instead of manually editing the shape in the inspector? Otherwise the shadow will always be created using the idle character shape even when he's attacking, which is kinda weird.
     
    RealoftRU likes this.
  3. CoraBlue

    CoraBlue

    Joined:
    Nov 16, 2017
    Posts:
    5
    I just wanna send a huge thank you to the team at Unity for this feature. This is actually insane. I really struggled for a really compelling reason to use LWRP/URP before this. This is literally a game changer.

    For small-time devs especially, we don't really have the luxury or frankly the knowledge in some cases to be worrying about a lighting system in a 2D game. Asset store packages can be a pain to implement and who knows how long support will last anyway? This is an honest reflection of only 2 hours of porting, half of which was hand-painting normal maps!

    https://imgur.com/a/gzfMQ64

    I went from throwing an additive material over the scene and calling it good enough to mindblowing results and the speed at which I did it speaks to how friendly you've made this system. You all deserve a freaking medal.

    EDIT: Very much looking forward to sprite atlas support in 20.2+ whenever that comes.
     
    Last edited: Feb 11, 2020 at 5:15 PM
    yuanxing_cai, EvOne and berkza like this.
  4. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,524
    Is there shadow caster support for tilemap?
     
  5. yuanxing_cai

    yuanxing_cai

    Unity Technologies

    Joined:
    Sep 26, 2014
    Posts:
    248
    I replied in the original post. In a nutshell, we want to enable user customization only after we get the 2D Renderer ready for production.
     
    berkza likes this.
  6. berkza

    berkza

    Joined:
    Oct 9, 2018
    Posts:
    3
    Thank for your response yuanxing_cai! 100% understandable and it gives me some insight on what to do. Just to let you know, I currently customized the renderer as Erdroy did, and it's working in my project. In the future if you need some testing in this matter I'll be here :)
    Thanks again!
     
  7. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,524
    @yuanxing_cai , can you let us know about shadow cast support for the tilemap please?
     
  8. alex174

    alex174

    Joined:
    Mar 19, 2019
    Posts:
    6
    Hello!
    On the 13th, the URP 7.2.1 update was released.
    When updating, the console displays a warning:
    "There are inconsistent line endings in the 'Packages / com.unity.render-pipelines.universal / Editor / AssetPostProcessors / FBXArnoldSurfaceMaterialDescriptionPreprocessor.cs' script. Some are Mac OS X (UNIX) and some are Windows.
    This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands."

    Why does version 7.1.8 have a status of "verified"?

    And further:
    On February 5th, Chris wrote that he fixed a problem with the color parameter in the Sprite Shape Renderer. This is the second URP update since then, but the fix is still not included.
    I fixed it manually, but after closing the project, the changes are not saved.
    When will this small fix be included in the URP update?
    Thanks in advance!
     
  9. berkza

    berkza

    Joined:
    Oct 9, 2018
    Posts:
    3
    Alex! In the meantime if you need to keep the changes I followed https://github.com/Unity-Technologies/ScriptableRenderPipeline#how-to-use-the-latest-version but instead of cloning the repo made a local copy of the package. Hope it helps.
     
  10. CoraBlue

    CoraBlue

    Joined:
    Nov 16, 2017
    Posts:
    5
    After tinkering with this a couple days I do have some minor issues.Without sprite atlas support (for now) am I stuck with this?



    The other solution would be pixel snap but I notice that the sprite shader in URP does not have pixel snap. Will the final version of the shader have pixel snap?

    Also will point out that at resolutions this small the lights themselves also subpixel drift a bit, which looks a bit off.

    Lastly it looks as if you're disabling lights that are outside the camera view for performance reasons, but this doesn't play well with 'offset' in freeform lights if you're trying to create a fade (a sunbeam effect or something). The light disappears well before the offset light is offscreen.
     
  11. yigitkahramn

    yigitkahramn

    Joined:
    Apr 14, 2018
    Posts:
    11
    Any highly optimistic ETA on this? At least a version target, maybe 2019 LTS?
     
  12. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    When we are out of experimental we should support all the features of the legacy sprite shader/renderer.

    As for the offset issue, thanks for finding this. This sounds like a bug and we will try and fix this when we can.
     
  13. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    There were reasons it didn't make it into 7.2.1. The color fix will hopefully be in the next version of Universal
     
    Lars-Steenhoff likes this.
  14. alex174

    alex174

    Joined:
    Mar 19, 2019
    Posts:
    6
    Thanks.
    Sorry for the importunity. Will wait.

    Thanks for the advice! I thought about it, but maybe I'll wait for the update.
    Did you put a copy of the package in the asset folder?
     
  15. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,524
    Any respond from Unity about shadow support for the tilemap?
     
  16. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    You can make this work, there has been some discussion about this in the forums, so you might want to poke around and see if you can find a solution that will work for you.

    Right now I will say the support for tilemap isn't the best it could be. There will be work done on this in the future, but I'm not sure when.
     
unityunity