Search Unity

Unity Experimental 2D Lights and Shader Graph support in LWRP

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

  1. Brunomir-

    Brunomir-

    Joined:
    Feb 23, 2019
    Posts:
    4
    I have a doubt if I may ask.. How do sorting groups works with this? Because when you Select the created Pipeline Asset then select and change Forward Renderer to Custom and then assign the 2D Renderer to the data field the Transparency Sort and Axis both disappear.
    I would apreciate if someone could help me with this issue, thanks a lot.
     
  2. Brunomir-

    Brunomir-

    Joined:
    Feb 23, 2019
    Posts:
    4
    By the way, I am experimenting the 2D LWRP with normal maps on a side - view game project, and I need the character to render in front or in the back of different objects according to his Y position.
    I used to do this without coding, is it posible yet?
     
  3. Wonka45

    Wonka45

    Joined:
    Aug 24, 2014
    Posts:
    13
    Normal Maps with Sprite Atlas and code access to TargetSortingLayers in Unity 2020.1 ?
     
  4. Brunomir-

    Brunomir-

    Joined:
    Feb 23, 2019
    Posts:
    4
    this is what I mean
     

    Attached Files:

  5. JoshWindsor

    JoshWindsor

    Joined:
    Jun 2, 2018
    Posts:
    3
    Hi there,

    Could anybody offer some advice on why my tilemap is coming up with lines using this pipeline and the experimental pixel perfect for this pipeline? Before changing to the 2d lighting, pixel perfect managed to stop those lines appearing. Is it something to do with my camera script?

    There is one singular black line that moves / changes as the character moves along the x axis.

    edit: It looks as though its the point light itself even while stationary, as you can see here.

    https://ibb.co/1Tmb9nx

    All the best,
    Josh

    https://ibb.co/z7ddxpz
    https://ibb.co/jJqTvWG
     
    Last edited: Jan 11, 2020
  6. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    Transparency Sort Mode and Transparency Sort Axis are both respected but not accessible when the Render Pipeline Asset is set. This means you can set them by removing the Render Pipeline Asset, changing the values you need to change, and setting the Render Pipeline Asset back.

    I have already made a fix for this which will allow these value to be set on the 2D Renderer Data, and hopefully this will be available in the next build of Universal.
     
    Brunomir- and dr4 like this.
  7. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    Secondary Texture Atlasing will likely be in for 20.2, TargetSortingLayers access will in for 20.1, and possibly for 19.3.
     
  8. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    Can you file a bug report with an attached project?
     
  9. dr4

    dr4

    Joined:
    Jan 14, 2015
    Posts:
    35
    _CameraOpaqueTexture in shader graph stopped working with the new 2D renderer, all the sprites using a material that cointains _CameraOpaqueTexture turns gray as soon as I change the renderer, is this a bug or a known issue? I'm using it for a bunch of effects across my project, any plan for having it working with this new renderer?
     
    berkza likes this.
  10. WinterfellsSummer

    WinterfellsSummer

    Joined:
    Sep 10, 2017
    Posts:
    2
    Hello there,I'm wondering if 2D lighting can make the light texture stretching like this, can you help me? thanks.
    sample.gif
     
  11. Brunomir-

    Brunomir-

    Joined:
    Feb 23, 2019
    Posts:
    4
    Thanks for taking the time to answer me!
     
  12. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    This is a known issue. Its something I'd like to address soon if we can, but I can't give you a time frame at the moment.
     
    dr4 likes this.
  13. dr4

    dr4

    Joined:
    Jan 14, 2015
    Posts:
    35
    thank you so much for answering! I have been looking for information like crazy and spent days working on alternatives without much success, now I feel better knowing its coming back.
     
  14. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    975
    I have an image texture in HDRP. Can I simulate 2D light projection like in 2D URP?
     
  15. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    Something similar is light cookies https://docs.unity3d.com/Manual/Cookies.html

    I assume they would work in HDRP but you'll have to try it.
     
    konsic likes this.
  16. jackytop

    jackytop

    Joined:
    Jun 13, 2017
    Posts:
    12
    @Chris_Chu good to know Thanks.

    Chris. I have an issue with SRP 2d renderer for DepthOfField post effect.
    https://forum.unity.com/threads/trouble-about-2d-depth-blur.607522/#post-5368749
    bgolus was helping me to figure out what's going on with 2d renderer in this thread.

    as soon as I change it to 2d renderer from forward, depthOfField doesn't work.

    is there a way to do depth of field with 2d renderer? or is it a bug?




    so when it is URP > ForwardRenderer with URP/Lit material. it works
    and Change to 2D renderer, with 3d sphere with URP/Lit, doesn't seem to generate depth texture.




    Here is my sprite shader as well.

    Code (CSharp):
    1. Shader "JcLwrp2DSprite"
    2. {
    3.     Properties
    4.     {
    5.         _MainTex("Diffuse", 2D) = "white" {}
    6.         _MaskTex("Mask", 2D) = "white" {}
    7.         _NormalMap("Normal Map", 2D) = "bump" {}
    8.         // Legacy properties. They're here so that materials using this shader can gracefully fallback to the legacy sprite shader.
    9.         [HideInInspector] _Color("Tint", Color) = (1,1,1,1)
    10.         [HideInInspector] _RendererColor("RendererColor", Color) = (1,1,1,1)
    11.         [HideInInspector] _Flip("Flip", Vector) = (1,1,1,1)
    12.         [HideInInspector] _AlphaTex("External Alpha", 2D) = "white" {}
    13.         [HideInInspector] _EnableExternalAlpha("Enable External Alpha", Float) = 0
    14.     }
    15.     HLSLINCLUDE
    16.     #include "Core.hlsl"
    17.     ENDHLSL
    18.     SubShader
    19.     {
    20.         Tags {"Queue" = "Geometry" "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" }
    21.         //Blend SrcAlpha OneMinusSrcAlpha
    22.         //Cull Off
    23.         //ZWrite On
    24.         Pass
    25.         {
    26.             Name "DepthOnly"
    27.             Tags{"LightMode" = "DepthOnly"} //DepthOnly
    28.             ZWrite On
    29.             ColorMask 0
    30.             Cull Off
    31.             HLSLPROGRAM
    32.             // Required to compile gles 2.0 with standard srp library
    33.             #pragma prefer_hlslcc gles
    34.             #pragma exclude_renderers d3d11_9x
    35.             #pragma target 2.0
    36.             #pragma vertex DepthOnlyVertex
    37.             #pragma fragment DepthOnlyFragment
    38.             // -------------------------------------
    39.             // Material Keywords
    40.             #pragma shader_feature _ALPHATEST_ON
    41.             #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
    42.             //--------------------------------------
    43.             // GPU Instancing
    44.             #pragma multi_compile_instancing
    45.             #include "LitInput.hlsl"
    46.             #include "DepthOnlyPass.hlsl"
    47.             ENDHLSL
    48.         }
    49.         Pass
    50.         {
    51.             Tags { "LightMode" = "Universal2D" }
    52.             HLSLPROGRAM
    53.             #pragma prefer_hlslcc gles
    54.             #pragma vertex CombinedShapeLightVertex
    55.             #pragma fragment CombinedShapeLightFragment
    56.             #pragma multi_compile USE_SHAPE_LIGHT_TYPE_0 __
    57.             #pragma multi_compile USE_SHAPE_LIGHT_TYPE_1 __
    58.             #pragma multi_compile USE_SHAPE_LIGHT_TYPE_2 __
    59.             #pragma multi_compile USE_SHAPE_LIGHT_TYPE_3 __
    60.             struct Attributes
    61.             {
    62.                 float3 positionOS   : POSITION;
    63.                 float4 color        : COLOR;
    64.                 float2  uv           : TEXCOORD0;
    65.             };
    66.             struct Varyings
    67.             {
    68.                 float4  positionCS  : SV_POSITION;
    69.                 float4  color       : COLOR;
    70.                 float2    uv          : TEXCOORD0;
    71.                 float2    lightingUV  : TEXCOORD1;
    72.             };
    73.             #include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/LightingUtility.hlsl"
    74.             TEXTURE2D(_MainTex);
    75.             SAMPLER(sampler_MainTex);
    76.             TEXTURE2D(_MaskTex);
    77.             SAMPLER(sampler_MaskTex);
    78.             TEXTURE2D(_NormalMap);
    79.             SAMPLER(sampler_NormalMap);
    80.             half4 _MainTex_ST;
    81.             half4 _NormalMap_ST;
    82.             #if USE_SHAPE_LIGHT_TYPE_0
    83.             SHAPE_LIGHT(0)
    84.             #endif
    85.             #if USE_SHAPE_LIGHT_TYPE_1
    86.             SHAPE_LIGHT(1)
    87.             #endif
    88.             #if USE_SHAPE_LIGHT_TYPE_2
    89.             SHAPE_LIGHT(2)
    90.             #endif
    91.             #if USE_SHAPE_LIGHT_TYPE_3
    92.             SHAPE_LIGHT(3)
    93.             #endif
    94.             Varyings CombinedShapeLightVertex(Attributes v)
    95.             {
    96.                 Varyings o = (Varyings)0;
    97.                 o.positionCS = TransformObjectToHClip(v.positionOS);
    98.                 o.uv = TRANSFORM_TEX(v.uv, _MainTex);
    99.                 float4 clipVertex = o.positionCS / o.positionCS.w;
    100.                 o.lightingUV = ComputeScreenPos(clipVertex).xy;
    101.                 o.color = v.color;
    102.                 return o;
    103.             }
    104.             #include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/CombinedShapeLightShared.hlsl"
    105.             half4 CombinedShapeLightFragment(Varyings i) : SV_Target
    106.             {
    107.                 half4 main = i.color * SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv);
    108.                 half4 mask = SAMPLE_TEXTURE2D(_MaskTex, sampler_MaskTex, i.uv);
    109.                 return CombinedShapeLightShared(main, mask, i.lightingUV);
    110.             }
    111.             ENDHLSL
    112.         }
    113.         Pass
    114.         {
    115.             Tags { "LightMode" = "NormalsRendering"}
    116.             HLSLPROGRAM
    117.             #pragma prefer_hlslcc gles
    118.             #pragma vertex NormalsRenderingVertex
    119.             #pragma fragment NormalsRenderingFragment
    120.             struct Attributes
    121.             {
    122.                 float3 positionOS   : POSITION;
    123.                 float4 color        : COLOR;
    124.                 float2 uv            : TEXCOORD0;
    125.                 float4 tangent      : TANGENT;
    126.             };
    127.             struct Varyings
    128.             {
    129.                 float4  positionCS        : SV_POSITION;
    130.                 float4  color            : COLOR;
    131.                 float2    uv                : TEXCOORD0;
    132.                 float3  normalWS        : TEXCOORD1;
    133.                 float3  tangentWS        : TEXCOORD2;
    134.                 float3  bitangentWS        : TEXCOORD3;
    135.             };
    136.             TEXTURE2D(_MainTex);
    137.             SAMPLER(sampler_MainTex);
    138.             TEXTURE2D(_NormalMap);
    139.             SAMPLER(sampler_NormalMap);
    140.             float4 _NormalMap_ST;  // Is this the right way to do this?
    141.             Varyings NormalsRenderingVertex(Attributes attributes)
    142.             {
    143.                 Varyings o = (Varyings)0;
    144.                 o.positionCS = TransformObjectToHClip(attributes.positionOS);
    145.                 o.uv = TRANSFORM_TEX(attributes.uv, _NormalMap);
    146.                 o.uv = attributes.uv;
    147.                 o.color = attributes.color;
    148.                 o.normalWS = TransformObjectToWorldDir(float3(0, 0, -1));
    149.                 o.tangentWS = TransformObjectToWorldDir(attributes.tangent.xyz);
    150.                 o.bitangentWS = cross(o.normalWS, o.tangentWS) * attributes.tangent.w;
    151.                 return o;
    152.             }
    153.             #include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/NormalsRenderingShared.hlsl"
    154.             float4 NormalsRenderingFragment(Varyings i) : SV_Target
    155.             {
    156.                 float4 mainTex = i.color * SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv);
    157.                 float3 normalTS = UnpackNormal(SAMPLE_TEXTURE2D(_NormalMap, sampler_NormalMap, i.uv));
    158.                 return NormalsRenderingShared(mainTex, normalTS, i.tangentWS.xyz, i.bitangentWS.xyz, i.normalWS.xyz);
    159.             }
    160.             ENDHLSL
    161.         }
    162.         Pass
    163.         {
    164.             Tags { "LightMode" = "UniversalForward" "Queue"="Transparent" "RenderType"="Transparent"}
    165.             HLSLPROGRAM
    166.             #pragma prefer_hlslcc gles
    167.             #pragma vertex UnlitVertex
    168.             #pragma fragment UnlitFragment
    169.             struct Attributes
    170.             {
    171.                 float3 positionOS   : POSITION;
    172.                 float4 color        : COLOR;
    173.                 float2 uv            : TEXCOORD0;
    174.             };
    175.             struct Varyings
    176.             {
    177.                 float4  positionCS        : SV_POSITION;
    178.                 float4  color            : COLOR;
    179.                 float2    uv                : TEXCOORD0;
    180.             };
    181.             TEXTURE2D(_MainTex);
    182.             SAMPLER(sampler_MainTex);
    183.             float4 _MainTex_ST;
    184.             Varyings UnlitVertex(Attributes attributes)
    185.             {
    186.                 Varyings o = (Varyings)0;
    187.                 o.positionCS = TransformObjectToHClip(attributes.positionOS);
    188.                 o.uv = TRANSFORM_TEX(attributes.uv, _MainTex);
    189.                 o.uv = attributes.uv;
    190.                 o.color = attributes.color;
    191.                 return o;
    192.             }
    193.             float4 UnlitFragment(Varyings i) : SV_Target
    194.             {
    195.                 float4 mainTex = i.color * SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.uv);
    196.                 return mainTex;
    197.             }
    198.             ENDHLSL
    199.         }
    200.     }
    201.     Fallback "Sprites/Default"
    202. }
     
  17. alex174

    alex174

    Joined:
    Mar 19, 2019
    Posts:
    6
    Hello!
    Unity 2019.3 beta
    Inside the sprite shape renderer, the "Color" parameter does not change!
    If the material with the "Sprite-Lit-Default" shader is applied to the sprite shape, then the sprite color cannot be changed! And if it is a single sprite (NOT a sprite shape) and the same material and shader, then the color changes.
    Will this be fixed? In general, did I ask this question here, or are there special places for such topics?
    Thanks in advance!
     
  18. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    Thanks for finding this. I think I know why. I'll have to look into it.
     
  19. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    I'll try and look into this next week.
     
    jackytop likes this.
  20. jackytop

    jackytop

    Joined:
    Jun 13, 2017
    Posts:
    12
    Thank you @Chris_Chu
    please test if depth of field post process works with 2d renderer with varying depth of sprite! cheers!
     
  21. alex174

    alex174

    Joined:
    Mar 19, 2019
    Posts:
    6
    Thanks!
    Will wait.
     
  22. NotEvenTrying

    NotEvenTrying

    Joined:
    May 17, 2017
    Posts:
    11
    Hi, for the 2D lights and the 2D shadow caster, could we also have an option to filter by z-depth ranges in addition to sorting layers? In quite a few cases I need to use z-depth as well to sort objects in my projects (especially with objects clipping through almost-3d things like rotated billboards for bodies of water), so having it be limited to just sorting layers is quite frustrating.

    I'm sure I'm not the only one who has/will have an issue with this, and more people will eventually be asking for this once URP becomes more stable and favored over the Core RP.
     
    Last edited: Jan 21, 2020
    Lars-Steenhoff likes this.
  23. Cryonics

    Cryonics

    Joined:
    Sep 30, 2013
    Posts:
    10
  24. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    I think I understand what you are talking about, but do you have an example you could post (like video or screenshot)?
     
  25. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    Its not great but he workaround for this is to add a vertex to your shadow caster in the middle of each of your sides.
     
  26. NotEvenTrying

    NotEvenTrying

    Joined:
    May 17, 2017
    Posts:
    11
    If you mean an example of my use case, see the first image I attached (below) of one of the areas in my game (if not, feel free to skip past the first image); here you can see that I've got rocks and part of a 2D terrain going through the top plane of water, and obviously if I use sorting layers here to have lights only light up some of the rocks or the terrain in front and exclude the back ones, it means these things can no longer visually be going through the water - they can only behind or in front of the water, regardless of their actual world position, due to different sorting layers.

    Even in situations where I can use sorting layers, it usually doesn't make any sense to and massively hinders my workflow as I place objects in 3D space and render them with a perspective camera for parallax, and also because sorting them by their z position works perfectly fine without sorting layers involved. Its a lot easier to manage complex, detailed scenes with lots of objects by sorting them with their position as it makes logical sense, compared to sorting layers, which quickly become cumbersome and a headache to work with once you have a large number of objects in visible proximity - they can even be outright limiting and unusable in some cases (due to the limitations on how many unique layers/order values you can have being relatively small), like games with lots procedurally generated objects which need to be sorted individually (something like Terraria, for example).




    If you meant an example of how it might be implemented; I was thinking of something along the lines of filtering objects for the lights by sorting layers and/or position be optional things (where by default it lights up everything) that you can toggle on/off and can also have additively (e.g. objects being lit based on both their sorting layers and position). That reminds me, currently we can only sort by the target layers, but not by a range of layer order values within a particular layer; that would be really nice to have, too. I threw together a quick prototype of what it might look like, maybe the .gif below will give you a better idea!



    That aside, the URP is finally starting to look somewhat stable and usable, which is a relief to see given it looked like a confusing jumbled mess up until a few months ago; keep up the great work, and please keep updating the docs for these new features ASAP, it goes a long way towards convincing more people to try out these new tools and features :)
     
  27. DeadZombieee

    DeadZombieee

    Joined:
    Mar 10, 2019
    Posts:
    29
    Hello! Any updates on this?
    I also want to have an access to 'Target sorting layers' via code :)
     
  28. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    It should be in for Universal RP 7.2. This should be available in the first week of February (unless it is postponed again).
     
    DeadZombieee likes this.
  29. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    Thanks for the screenshot and more detailed explanation, I better understand your issue now. We will need something like this down the road, because I'd like to better support mixing 2d game objects and 3d game objects. However, I'm not sure if this is the right change because, if in another game, one's object moves in z, one will see lights popping on/off and I don't know if that will feel buggy.

    Anyway, whatever we decide to do I'd say we won't have time to address it in the first half of this year.
     
  30. jackytop

    jackytop

    Joined:
    Jun 13, 2017
    Posts:
    12
    @Chris_Chu Chris have you tested out ? I still can't get it working.
    Let me know if you figured out! Cheers!
     
  31. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    Sorry, I was busier than expected, and still haven't had a chance. I'll message you and post here when I've got some news for you.
     
  32. jackytop

    jackytop

    Joined:
    Jun 13, 2017
    Posts:
    12
    @Chris_Chu No worries Chris! Thanks you!!
    Cheers!!!!
     
  33. NotEvenTrying

    NotEvenTrying

    Joined:
    May 17, 2017
    Posts:
    11
    Hi Chris, that is a non-issue, as I suggested from the very beginning to make the z-depth sorting an optional toggle, which my gif example also shows! Assuming the technical side of sorting by z-depth itself isn't too time consuming to implement (if it does, then its understandable delaying it) just having a basic UI for it in the inspector shouldn't take much effort to do and while may not look pretty, would at least add that functionality, rather than denying that functionality entirely for the sake of having it be a little more presentable.
     
  34. isitsou

    isitsou

    Joined:
    Dec 5, 2019
    Posts:
    1
    Hello guys, i am with 2 friends and we decided to make a 2D game for Windows PC. We started to learn Unity recently, so we don't have much experience. Currently, we are using Unity 2018.4.13f LTS and we are designing the first Scene of our game.
    We are considering putting dynamic lights in our project because lights give a warmth to the game and make it more alive, but we are not sure because we don't know:
    --> the "side-effects" of changing to a version that isn't LTS
    --> if we will have a stable game using these experimental 2D lights

    Also, we have experience in programming, but we also don't know anything about scripting a rendering pipeline so we don't know if we should change the Build-In rendering pipeline to the Universal rendering pipeline.
    So, my questions are these:
    1)It's a bad idea to leave the comfort of an LTS and go to the latest version 2019.3 for the sake of dynamic lights?
    2)Do we need to know how to script a rendering pipeline in order to work on an environment that uses URP?
     
  35. zfh2773

    zfh2773

    Joined:
    Nov 16, 2019
    Posts:
    10
  36. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    378
    We really like the effects we can get out of this package for our game, but are concerned about the preview/experimental status. Is there a roadmap or timeline for when you want to be out of preview?
     
  37. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    It looks like we are missing the copy depth pass that the universal forward renderer is using. At some point I'll look at adding this in, but it won't be immediately. DOF doesn't work properly with materials that don't do a zwrite (like sprite materials), so when I do this change I'll spend some time changing the sprite/sprite material to better support DOF.
     
  38. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    We hope to be out of experimental by sometime in July or August of this year, with the possible exception of shadows.
     
  39. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,469
    Yo, a quick bit of feedback.

    I participated in the Global Game Jam this weekend, and we used the 2D lights for lighting. Everything worked pretty smoothly! A great user experience all around. There was only one major annoyance:

    All lights by default hit only the "Default" sorting layer. This means that we have to go in and set the layers every time we add a light. Whenever we add a new sorting layer, we have to go into every single 2D light that exists and add that layer to their layers.
    I think the 3D light behaviour where the culling mask by default hits everything is much easier to work with. Alternatively, we could have a window where we set what layers a light should hit by default.
     
  40. alex174

    alex174

    Joined:
    Mar 19, 2019
    Posts:
    6
    Please do not forget about the "color" parameter, which does not work in sprite shape renderer.
     
  41. jackytop

    jackytop

    Joined:
    Jun 13, 2017
    Posts:
    12
    Thank you @Chris_Chu for figuring this out! I've been adding zwrite in sprite shader with forward-rendering for DOF.
    if you have a ETA for this updates, let us know!
    Meanwhile I will take out DOF in my game.

    Cheers!
     
  42. zfh2773

    zfh2773

    Joined:
    Nov 16, 2019
    Posts:
    10
    ok! Thank you for your answer! Looking forward to the depth of field support of sprite!
     
  43. BirdiePeep

    BirdiePeep

    Joined:
    May 12, 2015
    Posts:
    8
    I've noticed that with usually long shadow casters that the shadow ends abruptly opposed to going off until the end of the light. It's pretty easy to reproduce, is this a known issue or am I perhaps doing something wrong?
     

    Attached Files:

  44. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    This is a known issue. I am going to be reworking shadow rendering later in the year. For now you can add additional vertices along the long edge to work around this issue.
     
  45. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
  46. alex174

    alex174

    Joined:
    Mar 19, 2019
    Posts:
    6
    Oh thanks!
    I fixed it manually, everything works great!

    P.S. Sprite Shape Renderer does not have its own shortcut. All components have, and he has a white icon.:)
     
    Last edited: Feb 5, 2020
  47. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,524
    Is there roadmap for softshadow supprt?

    Any eta?
     
  48. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    Not at the moment, we need to fix the performance/issues of shadows before implementing soft shadow support.
     
  49. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,524
    Ok, well is there any roadmap we can check for the current and future status of 2dlighting development?
     
  50. Chris_Chu

    Chris_Chu

    Unity Technologies

    Joined:
    Apr 19, 2018
    Posts:
    86
    No, but for the next few months, we are working on overall rendering and lighting performance, bug fixing, as well as trying to get some of the missing features needed for lighting to exit experimental.
     
unityunity