Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Feedback Wanted: Lightweight Render Pipeline

Discussion in 'Graphics Experimental Previews' started by Tim-C, Feb 19, 2018.

Thread Status:
Not open for further replies.
  1. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,252
    How is the implementation of Gizmos and LWRP different from the built-in pipeline? Gizmos seem to fade out very quickly when still very close to the scene view camera in the editor. Is this by design and is it possible to change this behaviour?

    upload_2018-8-27_13-27-10.png
     
    Prodigga likes this.
  2. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Same issue as above. We can turn off 3D gizmos and it makes the lines appear correctly again, but this is not ideal.
     
  3. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    This was a bug with the scene view depth, this has since been fixed but we are currently blocked in releasing it till 2018.3 beta comes live.
     
    sstrong likes this.
  4. 4t0m1cw07f

    4t0m1cw07f

    Joined:
    Nov 2, 2015
    Posts:
    3
    Hi there,

    I recently upgraded my project to the latest version of LWRP and I'm getting some seriously weird rendering results once built to iOS device. Looks fine in editor.



    Any ideas?

    Edit: Gif wouldn't work so here's the link
     
    Last edited: Aug 28, 2018
    hadynlander likes this.
  5. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    I would definitely submit a bug with a repo scene, this looks like the tile renderer has really given up, but we haven't seen this here so would be good to see what the project consist of.
     
  6. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Is 2018.3 coming next week ?
     
  7. sand_lantern

    sand_lantern

    Joined:
    Sep 15, 2017
    Posts:
    210
    I kinda doubt it at this point. They were saying it would come out over a month ago, and then radio silence. Either that means they are mostly ready but keep finding "one more thing," or they found some major issues and have been reworking them.

    In that case, they are keeping quiet until they have a valuable ETA or maybe it will just come out without prewarning. I don't know that I'd hold my breath, either way.
     
  8. Mo_erges

    Mo_erges

    Joined:
    Aug 28, 2018
    Posts:
    2
    Hello, I have a problem, I want to use the stencil buffer or cut a hole in a mesh in Unity 2018.2.2f1, but with the lightweight renderpipeline it does not work. does anyone have an idea how to fix the problem?
    Or anyone an idea how i can hide a part of a mesh?
     
  9. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    I highly doubt it?

    It's frustrating because my LWRP issues have been fixed a month ago, but none of them are being backported to 2018.2 branch (no new 2018.2 LWRP release since July 27).

    On one hand, I empathize with Unity dev, it's a lot of work, and putting it out now would be doing everyone a disservice.

    On the other hand, Unity blog has been hyping SRP since 2018.1, putting it as the flagship "feature (preview)" in both 2018.1 and 2018.2 releases. YMMV, but to me they are so broken at the moment, I cannot imagine using it for production.

    Forgive me for being a bit passive-aggressive, I just want to jump off this 2018 starship and swim back to 2017 LTS boat.

    (the recent lighting pipeline best practice guide put some salt my old wound.)
     
    Last edited: Aug 29, 2018
    twobob, Immu and sand_lantern like this.
  10. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Let's not rush them, you know how rushed product is. Last time they said there's a problem with 2018.3 which they want to address before give public access
     
  11. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    That said, can anyone give me a quick primer on how LWRP cull light per-object? Or more specifically, how is the culling different from Built-in Forward?

    I assume there must be other optimization beyond looping over lights in a single pass?

    https://github.com/Unity-Technologi...ht/LWRP/ShaderLibrary/Lighting.hlsl#L545-L553

    EDIT: to be precise, the explainer blog post did say both Built-in Forward and LWRP light culling are per-object. But the best practice guide wrote something like:

    > The lights are culled per-object and allow for the lighting to be computed in one single pass.

    There is no connection between per-object light culling and whether lighting can be rendered in single pass, or is there?
     
    Last edited: Aug 29, 2018
  12. Peetalus

    Peetalus

    Joined:
    May 19, 2013
    Posts:
    2
    Hey, found an issue on Android. Testing with LRP 3.0.0 preview and 3.3.0 preview, same issue on both.

    I have a single pixel light in a scene with a bunch of meshrenderers creating shadows.
    When I run in unity, it looks fine, but if I run on android the light will disable as soon as the light comes near to a meshrenderer.

    I get the following errors from ADB.
    Code (csharp):
    1. 08-29 22:23:46.961: D/Unity(3121): fragment evaluation shader
    2. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: '_LocalWorldToShadowAtlas' : undeclared identifier
    3. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'expression' :  left of '[' is not of type array, matrix, or vector
    4. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'return' : function return is not matching type:
    5. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'expression' :  left of '[' is not of type array, matrix, or vector
    6. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'return' : function return is not matching type:
    7. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'expression' :  left of '[' is not of type array, matrix, or vector
    8. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'return' : function return is not matching type:
    9. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'expression' :  left of '[' is not of type array, matrix, or vector
    10. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'return' : function return is not matching type:
    11. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'expression' :  left of '[' is not of type array, matrix, or vector
    12. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'return' : function return is not matching type:
    13. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'expression' :  left of '[' is not of type array, matrix, or vector
    14. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'return' : function return is not matching type:
    15. 08-29 22:23:46.961: D/Unity(3121): ERROR: 0:114: 'expression' :  left of '[' is not of type array, matri
    16. 08-29 22:23:46.961: D/Unity(3121): Note: Creation of internal variant of shader 'LightweightPipeline/Standard (Simple Lighting)' failed.
    Now, I'm not confident with shaders, but in the file "com.unity.render-pipelines.lightweight@3.0.0-preview\LWRP\ShaderLibrary\Shadows.hlsl" has the following line:
    Code (csharp):
    1.  
    2. float4 shadowCoord = mul(_LocalWorldToShadowAtlas[lightIndex], float4(positionWS, 1.0));
    3.  
    It seems to be the issue. If I remove "[lightIndex]" it works, no errors, but no shadows show.
    Any clues?
     
  13. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Use 2.x for 2018.2, afaik what you are now looking at are meant for 2018.3
     
  14. Peetalus

    Peetalus

    Joined:
    May 19, 2013
    Posts:
    2
    You were right, I was using Unity 2017.2.5f1 and LWRP 3.0.0-preview.
    I swapped the LWRP and CoreRP both to 2.0.8-preview, still appear to be getting the exact same issue though.
    I even tried deleting the 3.0.0 packages, library and temp and reimporting the whole project, no luck though.
     
  15. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Can you please log a bug for us to investigate, we are very active right now on fixing lw bugs :)
     
    twobob likes this.
  16. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    We are also frustrated at how long the release of 18.3 beta is taking. It's always 'just a few days away' so we don't backport to 18.2 branch a lot of the fixes we are doing. We won't make this mistake in the future.
     
    sand_lantern, Reanimate_L and twobob like this.
  17. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    @Tim-C , as of now, is current state of HDRP 18.3 production ready (without the new terrrain)?
     
  18. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I one could like something twice. this is the post.

    (Okay threes times, just for your hat Tim, and I waited YEARS to say that)
     
    sand_lantern likes this.
  19. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Okay - so stupid question time.

    Which tag/branch/commit/revision of https://github.com/Unity-Technologies/ScriptableRenderPipeline/tree/

    is for 5.6.6? So i can test LWRP on 5.6?

    upload_2018-8-30_20-32-10.png

    (5.6.6 is solid as a rock, surely Unity appreciates that many professional developers not only own this outright, but would use it preferentially for just this reason )
     
    Last edited: Aug 30, 2018
  20. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789

    Shader graph is for 2018.1 onward so you won't be able to use that and older versions of LWRP you won't want to use since they have fewer features naturally. If you really want to mess use a 5.6 version then you can find it here
    (You will be missing a lot)
    https://github.com/Unity-Technologies/ScriptableRenderPipeline/releases?after=Unity-2017.3.0b2

    I would advise to get 2018.2 latest and use LWRP with that since it seems you just want to see how it is
     
    twobob likes this.
  21. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    Even the 2018.2 branch are in need of heavy patching, you will very well drive yourself crazy.
     
  22. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    Another shoutout to my previous question, appreciate any answers :)
     
  23. reflectingb0t

    reflectingb0t

    Joined:
    Apr 10, 2018
    Posts:
    18
    Has anyone figured out a workaround for having directional light culling mask yet? We need this feature to be fixed...
     
    konsic likes this.
  24. InfiniteAmmo

    InfiniteAmmo

    Joined:
    Aug 12, 2008
    Posts:
    45
    Just wondering if Lightweight pipeline has support to work with ProBuilder selection materials on 2018.2.x? It seems that with the lightweight pipeline active, the face selection rendering in ProBuilder doesn't work. (I assume this is because the probuilder selection materials are using internal probuilder shaders and not the lightweight ones?)
     
    Last edited: Aug 31, 2018
  25. JoshVIZfire

    JoshVIZfire

    Joined:
    Jul 26, 2018
    Posts:
    14
  26. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058

    thanks for the feedback.
    Pipeline in 5.6.6 feels like abandonware now. Salt rubbed in wound everytime I open "graphics"

    pfft. lameness. and kinda unprofessional
     
  27. sand_lantern

    sand_lantern

    Joined:
    Sep 15, 2017
    Posts:
    210
    I don't know, I was always under the impression that it was a 2018 feature. That was how they framed it at all their keynote speeches and blogs. You can't expect a company to backport every new feature (or any new feature really).
     
    twobob and Shizola like this.
  28. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I don't. Just everytime I open "graphics" it irks the hell out of me.
    Anyway. I'll shut up

    And you are totally wrong about it being a "2018" feature.
    At the rate they are going more like 2020, but it started in 5 and then they just ditched it for each new wonky beta along the way
     
    Last edited: Sep 10, 2018
    sand_lantern likes this.
  29. phungla1992

    phungla1992

    Joined:
    Aug 17, 2018
    Posts:
    1
    I can't update to v3.0.0 in unity 2018.2.6f1 :(, Amplify shader editor supported version render-pipeline.high-definition v3.0.0.

    Error with package details: Package has invalid dependencies:
    com.unity.render-pipelines.core: Version [3.0.0-preview] is incompatible with the selected version [2.0.6-preview]
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     

    Attached Files:

  30. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    Hey, sorry for the lack of information. We are writing docs on how lighting works in the LWRP forward renderer. Meanwhile let me give a quick overview of how lighting works in both Built-in and LWRP forward renderers.

    The per-object culling system is the same for both builtin-pipeline and LWRP. In culling step we cull lights that are not visible by the camera. This generates an array of visible lights. We then figure out which lights from this list affect each object, we sort per-object based on the intensity of the light at the object center. This generates a list of sorted light indices per-object.

    Now, the shading strategy changes between Built-in and LWRP.

    [Builtin Render Pipeline (forward)]
    Standard shader shades the brighest directional light + GI + emissive. For each additional light affecting the object an additional shading pass is performed. The problem here is that you have increased drawcalls + overdraw based on the amount of lights you have per-object. This was done because at the time the renderer was designed mobile didn't had any efficient way to shades lights in a for-loop in a single pass. Not only dynamic indexing is not guaranteed to be supported on fragment in GLES 2.0, but also indexing is expensive in dx9/gles 2.0 hardware.

    [LWRP (forward)]
    Standard shader shades the brightest directional light outside the for-loop + GI + emissive. So, no indexing/branching here and shading a directional light is fast on every platform. It also shades in the same pass punctual lights per-object in a for-loop. Currently there's no support to more than one directional light but this is being worked on and each directional light will be shaded in an additional pass. That's fine because directionals affect all objects in the layer.

    Now, we are still trying to figure out the best approach on GLES 2.0 devices that don't support dynamic indexing. Once we have that LWRP should be marginally equal or faster than Built-in in all platforms on most cases. I say most cases because well, if you are rendering just a few objects with multiple lights in forward then shading in multiple passes might be faster than in a single pass. There's no silver bullet here rendering approach that will work optimal for every possible platform/game combination. However, that's also where LWRP shines because we provide the full open source and ability to extend easily the pipeline for specific cases.
     
    bitinn and twobob like this.
  31. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    Hey, I'm sorry about that. It's a missing feature at the moment. Most likely support for it will be added in the next week.
     
  32. wdw8903

    wdw8903

    Joined:
    Apr 2, 2015
    Posts:
    48
    Hi, we are working on SRP project, we modify the legacy speedtree shader to work in SRP, but we still can't make the wind work with speedtree, I can't find any information in the github project, can you tell me something about official speedtree support plan?
     
  33. angelomoro

    angelomoro

    Joined:
    Sep 4, 2018
    Posts:
    13
    Hi!

    Any chances to get an AO Post-processing effect functional with the LWRP soon? Do you have an ETA for a version for the pipeline that's ready for production?

    Thanks!
     
  34. ivank

    ivank

    Joined:
    Nov 16, 2013
    Posts:
    105
    Well, based on Unity @Andre_Mcgrail s post on this forum from August 1st it does not look too promising :-(

    "....AO is a tricky one, it's definitely on our 'nice to have' list right now, but as we are trying to focus on stabilisation and documentation this most likely will be pushed to 2019.x due to LWRP only having Colour and Depth, this leaves little room to make something both performant and passable visually..."

    Its really pitty as AO is almost must for interactive visualizations etc...

    Another useful/needed thing is matte aka shadow-on-fully-transparent-plane - good for product vis, indispensable for AR etc (old implementation see Matte Shadow Drawer made by Unity own Keigiro Takahashi), but that is probably also just a dream for LWRP at this stage...
     
  35. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    There is a fair bit of work going on internally with the Terrain system, this means that we need to make sure we are not going to do irrelevant work, saying that, we are working on bringing LWRP to state where we can drop the preview tag, for this I would say having at least a basic conversion of the Speedtree shader is a must for that to happen.

    AO is a way off, or at least a version that will look any good, as you can see from the post above I've already explained things, but I have recently been playing some Breath of the Wild and while playing in handheld mode the AO is horrendously low-res and corse, so this has changed my thoughts on us waiting for the golden egg, ideally we would like to get at least a barebones one out the door when we go out of preview, but in saying that it will be very barebones. No promises.

    If converted there is no reason I can see from that Github repo as to why it would not work in LWRP, of course we are yet to release any documentation regarding writing/converting shaders for LWRP so it would be a challenge to get it working for sure, but not impossible.
     
    angelomoro and ivank like this.
  36. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    The original unity blogpost about SRP (like what? in 2016?) was vaunting the new pipeline ability as great because anyone could write their own. And now the mere mention of coming up with ones own solution seems to be utterly derided as foolish.

    Oh well. I guess I really missed the point of all of this work. Or perhaps that point changed.
    Glad you are finally managing to get something potentially "useable" after all this effort.
     
  37. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    476
  38. angelomoro

    angelomoro

    Joined:
    Sep 4, 2018
    Posts:
    13
    Thanks Andre for your answer, my mistake for not searching in deep of this post.
    I haven't played (yet) BoTW :(, nevertheless I understand what you're saying. Better at least to keep a minimum of visual quality. Meanwhile I will use the LWRPAO from Shindo-san. Let's hope it will be ready for 2019.1 :D
     
  39. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    No, I dont see it that way at all, there is nothing foolish about people developing their own pipelines, so long as they have the right resources/abilities and it makes sense in their situation to do it. It will also make sense for some people to customise one of the pipelines that Unity are providing, although there are risks to attempting such things when the pipelines are still changing quite a lot.

    A somewhat different but sometimes related issue is the state of the SRP feature within different versions of Unity itself. Clearly Unity first started going on about the scriptable pipeline feature long before it was really ready, and during the development of their own scriptable pipelines they have found things that needed to be changed or added to the core of Unity. The large amounts of progress seen with the pipelines during 2018 are what I was originally hoping to see in 2017, with 2019 looking more like the timeframe when things start to stabilise and mature. I know that is extremely annoying for someone such as yourself who was hoping for stuff that worked with Unity 5.6 or whatever, but I dont see how these annoyances and lengthening timescales actually make a material difference to the ultimate potential of scriptable render pipelines.
     
    Alverik, sand_lantern and twobob like this.
  40. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Oh okay. that is actually good news then. I will simply hang around and see what the (very sagacious) Unity team comes up with. Thanks for this ray of hope
     
  41. Schazzwozzer

    Schazzwozzer

    Joined:
    Jul 27, 2012
    Posts:
    18
    Minor request for Unity devs: change the protection level of a lot of the ShaderGUI editor code from private to protected. As it is, if I want to extend the LWRP standard shaders and add a few properties, I have to copy and paste essentially an entire editor class.

    For example, overriding ShaderPropertiesGUI() seems to be the logical way to insert new property fields, but it references a bunch of private fields and methods. Here's what I get when I paste the ShaderPropertiesGUI() method from LightweightStandardSimpleLightingGUI into a custom class which inherits from it:
    ShaderGUIProtectionLevels.png

    For now, I'll just call base.ShaderPropertiesGUI() and add my property fields at the beginning or end, but... it's so unnecessarily sloppy!
     
  42. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    Shizola likes this.
  43. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    Thanks for the feedback. I added that to my TODO list.
     
  44. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    18.3 Beta 1 is out now.
     
    sand_lantern likes this.
  45. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    Finally!

    Did a bit of test, my upgrade from a 2018.2 test repo isn't quite successful (package manager ui not working), but I re-created a new repo and try my previous demo again. LWRP PBR is finally working.

    Screen Shot 2018-09-12 at 18.03.40.png

    However I am seeing an interesting complication, I am not able to see any 3d model in my actual build (tried il2cpp and mono), only skybox:

    Screen Shot 2018-09-12 at 18.22.59.png

    Since this was working in 2018.2 builds (and certainly in 2018.3 editor), I am wondering what else has been added that lead to my problem...
     
  46. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
  47. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    macOS + Metal, but I think it's actually a case of 2018.3 not upgrading scene file properly. Because I just tried creating a new scene file and it certainly works in build.

    Then I tried duplicating the scene file and build with it, again the camera position and rendering is correct. So it's just the original scene file (created in 2018.2) appear to be affected.

    Both original scene file and the clone one look the same in editor (render fine in game view and play fine), but building them result in different camera position.

    (I think it's unlikely to be a LWRP issue.)

    Screen Shot 2018-09-12 at 22.07.32.png

    Screen Shot 2018-09-12 at 22.07.59.png
     
    phil_lira likes this.
  48. Desoxi

    Desoxi

    Joined:
    Apr 12, 2015
    Posts:
    195
    I there currently a bug with the object node (which outputs the world position and scale of an object)? I works fine in hdrender pipeline projects but in a lightweight project it doesnt.
     
  49. ivank

    ivank

    Joined:
    Nov 16, 2013
    Posts:
    105
    Thanks @Andre_Mcgrail for AO-related info.
    Maybe even "generic" AO Post-Processing solution would be good, so we could use it in our developing projects as a kind of "placeholder" while looking forward to future improvements.

    Regarding matte/shadow shader - thanks, will try to convert. Its pity though that such useful (for many, particularly VR cases) shader is not included in standard Unity installation...

    Anyway, thanks, and wish a lot of endurance in further development
     
  50. Driven

    Driven

    Joined:
    May 31, 2013
    Posts:
    77
    My lights just turn off in LWRP when there are more than 1 light visible so only 1 lighsource stays active the whole time and while the camera is moving new lights appearing just turn off or on depending if there are more nearby visible. No matter if i set max pixel light to 4 or 8. Is this a Bug and how do i fix this?
     
Thread Status:
Not open for further replies.