Search Unity

2D | LWRP | HDRP with 2D?

Discussion in '2D Experimental Preview' started by _watcher_, May 11, 2019.

  1. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    132
    Hey, does LWRP or HDRP project benefit a purely 2D project? I just saw the new 2D lighting presentation from GDC and was wondering, if im about to create a fresh unity project, which would mainly use sprites and 2 dimensions to display things or convert an existing one, would choosing LWRP project type have any benefit at all? To pose the same question another way, are there (will there be) any new default (LWRP?) sprite shaders or LWRP sprites (read somewhere that RP-based sprites will come in the future?), would this be integrated within 2D or say LWRP? Im asking, because porting existing complex HDRP base to say LWRP might be difficult, in the same vein 2D to LWRP, so what would you recommend the base project type should be for a new project at this time? Does using Meshes and LWRP rather than Sprites and 2D have any benefit? (better shaders/effects/anything?). Just a bunch of generic question circling around the idea im having..
     
  2. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,847
    HDRP - probably not,

    LWRP - most definately, as you can use the new shadergraph which in the latest update includes master nodes for 2D so you can node edit 2D shaders. I would imagine you would see an increase in performance too

    Other than that, it wont "look" any better probably, unless you factor in the 2D lighting coming soon
     
    _watcher_ likes this.
  3. cecilcruxis

    cecilcruxis

    Joined:
    Sep 17, 2013
    Posts:
    92

    TLDR for those that don't want to read every part.

    The 2d LWRP system for sprites will be coming out within the next few weeks for experimental preview. This contains the new 2D Lights, better Pixel Perfect Camera support for sprites, and other goodies.


    For those that like a read.
    Before going on here is the github repo that has all the 2D SRP Docs in it. Click on the file changes and you can read through the 2D SRP Docs.

    https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/3624/files

    The 2D SRP was being made for several things. It will include new lighting system that is super performance happy on all devices. The lighting system will include a few different types of light.

    Freeform: You can edit the shape of this Light type with a spline editor.
    Sprite: You can select a Sprite to create this Light type.
    Parametric: You can use a n-sided polygon to create this his type of 2D Light.
    Point: You can control the inner and outer radius, direction and angle of this Light type.
    Global: This 2D Light affects all rendered Sprites on all targeted sorting layers.

    These include the ability to alpha blend over each other on overlap. For values thet rgb goes on a scale to 1 if I remember reading the documents right. I do believe there was mention of supporting HDR. I think to do HDR you just bump the values above 1. Don't quote me on this. Just remember got to have a monitor or platform that supports HDR to see any changes.

    For some values we got light order to control which light is rendered first on a sorting layer if multiple lights are effecting the same sorting layer.

    Normal maps can be used except for global lights. Global lights as far as I know won't support normal maps, but that is something that makes sense and is expected. If you are using normal maps you will have two additional options called distance and accuracy.

    Quality value to allow developers to dedicate more processing to the light system to enable the balance between performance and accuracy.

    Volume Opacity works on all types and will be a slider. this is to control the visibility of the volumetric light.

    Target layers to make it where only certain layers are effected by certain lights.


    Going to blend styles.

    Blend modes include Original Sprite, Multiply, Additive and Subtractive.


    Mask texture Channels have 4 channels for RGBA.


    There is more, but running out of typing energy.

    You get the jist though we do have a 2D SRP system coming.
     
    GameDevCouple_I, foxnne and _watcher_ like this.
  4. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    132
    @GameDevCouple_I Hey! I was about to dabble into LWRP/SharedGraph, and found many of your posts, in some of them you mentioned you'd like to gather info on/ and later post a thread on "how to create shaders for the new Rendering Pipes" with some example perhaps - that was 1yr ago - i wanted to ask - did you have a chance to gather your knowledge & dump it into a thread somewhere and if so could you link it here?

    I'll prob start with ShaderGraph and sprites in LWRP first, as i worked in Substance so it would be familiar, but would like to understand the new shader language later also. Anyways i read a lot on the "still in preview" so will prob. wait with all this until a bit later when all them current preview features get out of beta, work on something else in the meantime (dont like when stuff changes having to redo it over again). Would you yourself recommend doing LWRP 2D for a new commertial project or stick to old system? Thanks