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
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback Wanted: Lightweight Render Pipeline

Discussion in 'Graphics Experimental Previews' started by phil_lira, Sep 28, 2018.

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

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    I'm not aware of VR being in preview. There are some issues indeed VR team is on top of. Where did you see it?
     
  2. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    Hey, glad you liked it. That was a mock-up to get some early ux feedback. It's not finished yet. We are working on it.
     
    fotalik likes this.
  3. ivank

    ivank

    Joined:
    Nov 16, 2013
    Posts:
    105
    AO in LWRP status?

    Hello @phil_lira , in connection with 2019.3 Alpha coming out, we would appreciate any info regarding the availability of realtime Ambient Occlusion in LWRP (as mentioned earlier in the roadmap)...
    Is it already in view, whether or not as part of any hypothetical new PostProcessing system...?
    If yes, when, and will it be backported later also for 2019.2...?

    Questions, questions... sorry:)
    We are planning some arch viz stuff and the info would help us a lot.
     
    noio likes this.
  4. PartyBoat

    PartyBoat

    Joined:
    Oct 21, 2012
    Posts:
    97
    Glad to see things moving so quickly. The ticket I created is 1156241.
     
  5. legoblaster1234

    legoblaster1234

    Joined:
    Aug 7, 2017
    Posts:
    27
    Is there a new thread like this one for lwrp 5?
     
  6. Stranger-Games

    Stranger-Games

    Joined:
    May 10, 2014
    Posts:
    393
    Thank you very much for your reply.
    Here's creating a new project in 2019.1.1f1, it shows VR LWRP as 'preview'.
    upload_2019-5-21_14-56-54.png
    I'm developing a VR cardboard architectural visualization application for a client and I need to make rendering as good as possible while keeping good performance on mobile cardboard VR.
    LWRP Lit shader seems to be a very good solution, however I noticed the serious black screen bug, then noticed in the new screen it says VR LWRP preview.
    So I'm wondering if I can keep using VR LWRP for my client's work reliably.
     
  7. Eyeofgod

    Eyeofgod

    Joined:
    Jun 25, 2010
    Posts:
    126
    LWRP it's out of preview and production ready, but the render loop allocates per frame... This is not a strange corner case, just press play and see the profiler. I don't know for you, but I think we understand differently what "production ready" means. If the objective of LWRP was to have a more performant rendering, why not to pay attention to allocations since the beginning? Now we have to wait more than half a year to get the a proper fix (hopefully). Maybe is this the typical case of management forcing to release a WIP feature going against all the Unity coders advices and labeling it as "Production ready" ? Jus guessing...
     
    tspk91 and chriscode like this.
  8. skydestinies

    skydestinies

    Joined:
    Feb 6, 2014
    Posts:
    19
    Hello,
    I found a built player only issue with LWRP and the "opaque texture" checkbox in the LightweightRenderPipelineAsset.
    Basically, the checkbox causes my thumbnail cameras to no longer render images with a transparent background, but only in built versions of the game. It looks fine in the editor. Is this intended?

    Original post here: https://forum.unity.com/threads/cam...paque-background-only-in-built-player.682411/
     
  9. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    Will there be realtime point light shadow and official lens flares for lwrp?
     
  10. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    A few things:
    1) you should not have to wait half a year to get this fix. It will be available in the upcoming weeks.
    2) Most of the allocations were happening due to GetComponent calls. We made a lot of work so the render pass injection system in LWRP does not depend on components. This was a big work to get LWRP production ready. Still there are a few ones being called because SRP depends on extra camera and lighting data that come from components. The issue of GetComponents allocating memory was recently addressed by scripting team and LWRP is now using the new TryGetComponent that doesn't allocate memory. I've asked for the TryGetComponent to be available in 2019.2. Hopefully it will be backported.
    3) Last, regression can happen in any software, and that's why I said we dropped the ball on this one because we could have written automated tests to catch heap alloc regressions. There was a regression in Unity affecting all render pipelines and one in LWRP code when we moved to the new render pass system.
     
    noio likes this.
  11. Eyeofgod

    Eyeofgod

    Joined:
    Jun 25, 2010
    Posts:
    126
    You have explain everything perfectly and even show me new upcoming features like the TryGetComponent. Many many thanks. Probably I had been testing the allocations in the versions that had the issue (pure bad luck). I saw that in 2018.3 LWRP 4.something and then in 2019.1 LWRP 5.13 is still there, so I just wrongly assumed that nothing was fixed in all that time. My fault. Sorry for that.
     
    phil_lira likes this.
  12. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    Template and XR team are looking into this issue. I'd recommend opening a bug report for it as well.
     
    Stranger-Games likes this.
  13. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    584
    Hey thanks for reporting it. It seems a duplicate of this one: https://issuetracker.unity3d.com/is...-background-color-in-windows-standalone-build

    In any case I'd suggest to report a new one and our QA will figure out if it's a duplicate or not.
     
    skydestinies likes this.
  14. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Is switching LWRP assets at runtime supposed to work or not by now? Or is there anything else that needs to be done besides "GraphicsSettings.renderPipelineAsset = myPipelineAsset;"?

    We used it a while back (in 2019.2 alpha) and it was working (could clearly see e.g. Shadows being turned on and off), but with the latest releases it doesn't switch anything or goes into completely broken states (that are not from any LWRP asset alone). There seems to be issues as well with changing the the renderPipelineAsset in OnEnable on loading a scene additively. I'll try to reproduce and submit a bug, but right now it's very obviously broken and I thought I'd put this out. Only thing we're trying to do is have separate profiles for separate scenes that are loaded additively and enabled / disabled as such.

    (Edit: bug report is submitted as Case 1157408)
    (Edit: found more issues with LWRP switching + Shader Variant Collections, Case 1157420)
     
    Last edited: May 24, 2019
  15. StefDevs

    StefDevs

    Joined:
    Jan 20, 2014
    Posts:
    23
    Hate to be a bother, but any status on that camera stacking workflow/functionality? I was under the impression that it was coming with 2019.1 but maybe that's my bad.
     
    tspk91, IAmJustADog and KMacro like this.
  16. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    223
    Mmm not sure if this has been brought to you before (a quick search indicates that no) but when using this pipeline Lit shader, the Material.color property becomes useless.
    Seems the name of the color in the shader is "_BaseColor" so we can set it as a workaround but I think this needs fixing. (Btw, I had to more or less guess the color name as I couldn't find it in the docs)
     
  17. a0950212

    a0950212

    Joined:
    Sep 28, 2014
    Posts:
    7
    Does anyone know how to graph object that regardless camera's distance?
    (keep same size in screen)

    Thank you for your reply.
     
    Last edited: May 27, 2019
  18. Tarrag

    Tarrag

    Joined:
    Nov 7, 2016
    Posts:
    215
  19. chriscode

    chriscode

    Joined:
    Mar 2, 2015
    Posts:
    48
    Switched my small project to lightweight render pipeline, and performance is no better, slightly more jerky. Quite a big faff for no result! And looks worse. Has anyone found they actually get a jump in performance by switching, as this is kind of the point of the whole thing!
     
  20. Vak_HD

    Vak_HD

    Joined:
    Aug 6, 2016
    Posts:
    14
    I have using LWRP for my project and noticed that I'm getting about ~3KB of GC per frame is this normal or is there something I'm doing wrong? Ill include some screen shots of my profiler showing this. Currently using Unity 2019.1.4 and LWRP 5.16.1
     

    Attached Files:

  21. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,586
    StefDevs likes this.
  22. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,586
    StefDevs likes this.
  23. Oriontyz

    Oriontyz

    Joined:
    Apr 25, 2019
    Posts:
    9
    Bug report: Unity 2019.1.3f version, I use shader graph to make a pbr shader with the lwrp(not using lit),however, it works and perform right in the pc editor, but in the mobile phone, the environment reflection' specular lighting calculate is wrong when i build it in the Android platform.It seems that the FresnelTerm is wrong in the mobile but i dont know why. Anyone could tell me if this is a bug?
     
  24. Oriontyz

    Oriontyz

    Joined:
    Apr 25, 2019
    Posts:
    9
    企业微信截图_15590964228763.png 5ab90893cc1ed86ec9f8bc6dd0028de3.jpg
    The top is on the Unity Editor, and the bottom is on android mobile.The Diffrent-behavior balls are using the lwrp shader graph and the right balls are using the Lit Shader
     

    Attached Files:

    fherbst likes this.
  25. Oriontyz

    Oriontyz

    Joined:
    Apr 25, 2019
    Posts:
    9
    And I choose the Linear As rendering Color Space. It seems that there is something wrong with the linear
     
  26. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    @Oriontyz did you actually report a but through Unity? If yes, please post the case number here, it helps the right guys find it faster. If not, please do and then post here :)
     
  27. Oriontyz

    Oriontyz

    Joined:
    Apr 25, 2019
    Posts:
    9
    Case Number is 1158872
     
    fherbst and Peter77 like this.
  28. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    Hi LWRP team, so I face an issue where:

    - A LWRP instanced shader variant is not included in final build of my game.

    - The way I do it, is to use Strip All as the instancing variant stripping setting, but also manually include them via Addressables and Shader Variant Collection/Materials.

    - After submitting repro case, Addressable team inform me that, Strip All + Shader Variant Collection approach to reduce compile time is not supported by them, and we need to use Strip Used instead.

    - I believe there is a misunderstanding here, and wonder if you can help look into it:

    The case is 1153579, replies from Addressables team is here:

    https://forum.unity.com/threads/0-8...r-with-drawmeshinstanced.676291/#post-4600078
     
  29. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,639
    AlejUb, LukWol and StefDevs like this.
  30. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,639
    I need this too for UI. Can we have an update?
     
    AlejUb and LukWol like this.
  31. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    563
  32. plauk

    plauk

    Joined:
    Jun 4, 2013
    Posts:
    10
    Just checking in to see what the latest official word is re. camera stacking. Please don't say 6 months :\
     
    PartyBoat and LukWol like this.
  33. LukWol

    LukWol

    Joined:
    Nov 12, 2015
    Posts:
    12
    +1
     
  34. Thomas-Pasieka

    Thomas-Pasieka

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    @phil_lira Any ETA on supporting more than 1 Directional Light? I'd really like to use 2 Directionals (1 being a Shadow caster while the other isn't).
     
  35. Captain_Flaush

    Captain_Flaush

    Joined:
    Apr 20, 2017
    Posts:
    65
    Hello,

    We are using LWRP 4.10 and on Adreno 320 instancing does not work.

    Any ideea why and where could we find the code that handles this in the LWRP package?

    Thanks!
     
  36. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Shouldnt LWRP hae its own subforum (under the main graphics forum?) now, since it isnt in preview anymore and hasnt been for some time?
     
  37. Destrucity

    Destrucity

    Joined:
    Sep 28, 2014
    Posts:
    17
    When using LWRP, is there a way to access the color of a material in script?
    material.color
    does not seem to work for LWRP.
     
    FURKANKAHVECI likes this.
  38. Destrucity

    Destrucity

    Joined:
    Sep 28, 2014
    Posts:
    17
    Another question, is it possible to use ProBuilder's vertex color features with the LWRP?
     
  39. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    @Destrucity accessing color works with material.GetColor("_BaseColor").
    Also, you can use vertex colors through ShaderGraph in LWRP.
     
    Destrucity likes this.
  40. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    Polybrush comes with shaders for each pipeline which includes one with Vertex color support made in Shader Graph. Otherwise, you'll have to create one yourself with Shader Graph.
     
    Destrucity likes this.
  41. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
  42. Matt-Cranktrain

    Matt-Cranktrain

    Joined:
    Sep 10, 2013
    Posts:
    129
    That's really great to see, thanks for the link to the updated roadmap, it can sometimes be hard to find up to date information! Glad we're getting Camera Stacking and Multiple Directional Lights soon.

    Also! 2019.3 is when there will be "Performance Focused Post-Processing for LWRP", which is also good news for me.
     
    elbows likes this.
  43. Immu

    Immu

    Joined:
    Jun 18, 2013
    Posts:
    240
    Since I've upgraded to 2019 unity, my shaders all turn pink i my collaborate builds. (win64)
    But not in my editor, nore if I do a normal build where they're all fine.
    I didn't had that issue before.
    Any clues?

    Using LWRP 5.16.1 & 2019.1.6f1

    I see that error in collaborate log:
    76: [Unity] Shader error in 'Lightweight Render Pipeline/Unlit': failed to open source file: 'UnlitInput.hlsl' at line 53 (on glcore)
    (but I'm using other lwrp shaders anyway)

    Could It be because collaborate is still building under 2019.1.5 ? Or can't load the same version of LWRP.


    Edit: Did a 'CLEAN BUILD' on collaborate, and now it works.
     
    Last edited: Jun 11, 2019
  44. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    So this basically means the excessive GC problem is likely fixed in 2019.3, but when it will get to users completely depends on backport team, right?

    (I got quite a few issues closed like this recently, I guess that's just life with Unity package)
     
    fherbst likes this.
  45. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
  46. interpol_kun

    interpol_kun

    Joined:
    Jul 28, 2016
    Posts:
    134
    Okay, my first experience with LWRP on Android is quite frustrating.

    I got a performance issue from the very start. I did a simple endless level (I have only 3 small tiles at the same time + character controller) and got 20-30FPS with only 1 light source (Directional light, real-time). When I turn it off or change it to baked, FPS goes to 60. The funniest thing is that when I turn everything off (except Light, camera and event system), I get 60 FPS. But If I enable anything with a mesh renderer, I instantly get 30 FPS.

    I have an old project with the legacy renderer, it has a procedurally generated maze (more geometry than endless level, a lot of complex materials with normal maps and hi-res textures) and real-time directional light. I can generate a new maze with a click of a button, and I have solid 60 FPS.
     
    phil_lira and FURKANKAHVECI like this.
  47. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    @Oriontyz @phil_lira have you gotten feedback about case 1158872? Would love to hear it, as I'm experiencing the same issue. Interestingly, it only happens on LOD 0 for whatever reason.
     
  48. Oriontyz

    Oriontyz

    Joined:
    Apr 25, 2019
    Posts:
    9
    The Unity only asked me to upgrade the version to the newest, but it doesn't work.
     
    fherbst likes this.
  49. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,893
    @phil_lira if two or more cameras render to the same off-screen target, will each camera respect what's already written by the other camera or will they clear the target before rendering? Will be there an option to keep contents in this case? Otherwise making each camera render in its own target and doing a final composition plus a blit to the screen seems more expensive (and definitely more complex)?
    In this case all cameras are created, configured and controlled by script and using the same fov, camera settings, etc. but differ in position and Rect.
     
  50. Revolter

    Revolter

    Joined:
    Mar 15, 2014
    Posts:
    216
    Using LWRP 7 with Unity 2019.3.0a5 with a super simple scene, and default configuration, and getting 45fps when everything is static on Google Pixel 2 XL. Is it not possible to get 60fps on a high-end android device?
     
    FURKANKAHVECI likes this.
Thread Status:
Not open for further replies.