Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    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. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    790
    Also, switched back to OpenGL3 (no errors), but found a different issue not related to OpenGL2:

    HDR on: everything looks fine, even if I change MSAA and Render Scale.
    HDR off: Everything looks fine only if MSAA is disabled and Render Scale is 1. If I change MSAA or RenderScale, scene becomes really dark.

    HDR disabled, MSAA disabled, Render Scale at 1: (Looks correct)
    upload_2018-12-28_16-7-59.png

    If I touch Render Scale (set it to .9)
    upload_2018-12-28_16-8-27.png

    Enabling HDR fixes issue:
    upload_2018-12-28_16-10-3.png

    Edit:

    With HDR turned off, and MSAA disabled + Render Scale at 1, the game view looks correct but I just realized the scene view looks like rubbish now..!

    upload_2018-12-28_17-18-54.png

    I wish I could say there was something special about my project configuration but this is a fresh 19.1a12 project where I wanted to try out the LWRP. It looks like this right out of the box.
     
    Last edited: Dec 28, 2018
  2. FURKANKAHVECI

    FURKANKAHVECI

    Joined:
    May 12, 2013
    Posts:
    14
    Your answer funny...
    I need to download LWRP: [5.3.0] - 2018-11
     
  3. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    Are you using Unity 2018? Then no, you can't, 5.x is for 2019.1 release, it's not backward compatible.
     
    hippocoder and FURKANKAHVECI like this.
  4. ImbaGame

    ImbaGame

    Joined:
    Jan 29, 2015
    Posts:
    11
    I got this error on cloud build when using Shader Lightweight Render Pipeline/Particles/Lit version 4.6.0 preview and Unity 2018.3

    This is stack trace of error on cloud build.

    1631: [Unity] Updating Assets/NatureManufacture Assets/L.V.E- Lava and Volcano Environment/Particles/Materials/Vulcano Smoke.mat - GUID: fde44d9fc5af87b45a4b312852d58e09...
    1632: [Unity] Shader 'Lightweight Render Pipeline/Particles/Lit': fallback shader 'Lightweight Render Pipeline/Particles/SimpleLit' not found
    1633: [Unity] WARNING: RGBA Compressed PVRTC 4BPP UNorm format is not supported, decompressing texture
    1634: [Unity] WARNING: RGB Compressed PVRTC 4BPP UNorm format is not supported, decompressing texture
    1635: Unity(11291,0x7fffac216380) malloc: *** error for object 0x1168e4020: pointer being freed was not allocated
    1636: *** set a breakpoint in malloc_error_break to debug
    1637: Stacktrace:
    1638: at <unknown> <0xffffffff>
    1639: at (wrapper managed-to-native) UnityEngine.Experimental.Rendering.ScriptableRenderContext.Submit_Internal_Injected (UnityEngine.Experimental.Rendering.ScriptableRenderContext&) [0x00007] in <87f35bae0d0044ee81a6d75ba47715a8>:0
    1640: at UnityEngine.Experimental.Rendering.ScriptableRenderContext.Submit_Internal () [0x00001] in <87f35bae0d0044ee81a6d75ba47715a8>:0
    1641: at UnityEngine.Experimental.Rendering.LightweightPipeline.LightweightRenderPipeline.RenderSingleCamera (UnityEngine.Experimental.Rendering.LightweightPipeline.LightweightRenderPipeline,UnityEngine.Experimental.Rendering.ScriptableRenderContext,UnityEngine.Camera,UnityEngine.Experimental.Rendering.CullResults&,UnityEngine.Experimental.Rendering.LightweightPipeline.IRendererSetup) [0x0012b] in /BUILD_PATH/sugastudio.heroes.iah-ios-app-store-master/Library/PackageCache/com.unity.render-pipelines.lightweight@4.6.0-preview/Runtime/LightweightRenderPipeline.cs:225
    1642: at UnityEngine.Experimental.Rendering.LightweightPipeline.LightweightRenderPipeline.Render (UnityEngine.Experimental.Rendering.ScriptableRenderContext,UnityEngine.Camera[]) [0x00064] in /BUILD_PATH/sugastudio.heroes.iah-ios-app-store-master/Library/PackageCache/com.unity.render-pipelines.lightweight@4.6.0-preview/Runtime/LightweightRenderPipeline.cs:172
    1643: at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object_object_intptr (object,intptr,intptr,intptr) [0x0002c] in <87f35bae0d0044ee81a6d75ba47715a8>:0
    1644: at <unknown> <0xffffffff>
    1645: at (wrapper managed-to-native) UnityEngine.Camera.Render (UnityEngine.Camera) [0x00013] in <87f35bae0d0044ee81a6d75ba47715a8>:0
    1646: at (wrapper runtime-invoke) <Module>.runtime_invoke_object_object_object_object (object,intptr,intptr,intptr) [0x0002b] in <2ac79605430c481986a0230bb69649f6>:0
    1647: Native stacktrace:
    1648: 0 libmonobdwgc-2.0.dylib 0x00000001394aa9a6 mono_handle_native_crash + 242
    1649: 1 libsystem_platform.dylib 0x00007fff73e0bf5a _sigtramp + 26
    1650: 2 ??? 0x00000001177d9b80 0x0 + 4689075072
    1651: 3 libsystem_c.dylib 0x00007fff73ba91ae abort + 127
    1652: 4 libsystem_malloc.dylib 0x00007fff73ca7822 free + 521
    1653: 5 Unity 0x0000000100df4c6f _Z29GetSubProgramForShaderSnippetP6ShaderPN9ShaderLab4PassERK13ShaderSnippet10ShaderTypejRK16ShaderKeywordSetRK12fixed_bitsetILi28EjEPK13dynamic_arrayIS8_Lm0EE22ShaderCompilerPlatformR19ShaderSnippetResultR17ShaderChannelMask18ShaderRequirements + 463
    1654: 6 Unity 0x0000000100e1d225 _ZN9ShaderLab7Program23CompileShaderSubProgramEP6ShaderPNS_4PassERK13ShaderSnippetjR16ShaderKeywordSetR19ShaderSnippetResultR17ShaderChannelMask18ShaderRequirements + 693
    1655: 7 Unity 0x0000000100e1da26 _ZN9ShaderLab7Program25CompileMatchingSubProgramEP6ShaderPNS_4PassERK16ShaderKeywordSetjPS5_R19ShaderSnippetResult + 1382
    1656: 8 Unity 0x0000000100e1aaf1 _ZNK9ShaderLab7Program21GetMatchingSubProgramEPK6ShaderPKNS_4PassERK16ShaderKeywordSetjPS7_R19ShaderSnippetResult + 449
    1657: 9 Unity 0x0000000100e275c6 _ZNK9ShaderLab11ShaderState20FindSubProgramsToUseEPK6ShaderPKNS_4PassERNS_11SubProgramsERK17ShaderPassContext + 662
    1658: 10 Unity 0x0000000100e27bf6 _ZNK9ShaderLab11ShaderState16ApplyShaderStateEjPK19ShaderPropertySheetRK17ShaderPassContextP6ShaderPNS_4PassEPNS_11SubProgramsEPK22DeviceRenderStateBlock + 134
    1659: 11 Unity 0x0000000100e19f56 _ZN9ShaderLab4Pass9ApplyPassEjPK19ShaderPropertySheetR17ShaderPassContextP6ShaderiPKNS_10GrabPassesEPNS_11SubProgramsEPK22DeviceRenderStateBlock + 310
    1660: 12 Unity 0x0000000100dae465 _Z26ApplyMaterialPassWithCacheRK18SharedMaterialDataR17ShaderPassContextP6ShaderPN9ShaderLab4PassEibPKNS6_10GrabPassesEPNS6_11SubProgramsEPK22DeviceRenderStateBlock + 1029
    1661: 13 Unity 0x0000000100dbaca6 _Z37ApplyMaterialPassAndKeywordsWithCacheRK18SharedMaterialDataR17ShaderPassContextP6ShaderPN9ShaderLab4PassEibPKNS6_10GrabPassesEPNS6_11SubProgramsEPK22DeviceRenderStateBlock + 134
    1662: 14 Unity 0x00000001009750fa _ZN13BatchRenderer15ApplyShaderPassER17ShaderPassContextPK18SharedMaterialDataP6ShaderPN9ShaderLab4PassEi13BatchingFlagsbbPKNS7_10GrabPassesEPK22DeviceRenderStateBlock + 394
    1663: 15 Unity 0x0000000100bde62e _Z24ScriptableRenderLoopDrawPK24ScriptableLoopObjectDatamRK19SharedRendererSceneRK20DrawRenderersCommandR17ShaderPassContextR9GfxDevice + 3934
    1664: 16 Unity 0x0000000100be3ebe _ZL23ScriptableRenderLoopJobPN21GfxDeviceAsyncCommand10ArgScratchEPKNS_3ArgE + 174
    1665: 17 Unity 0x0000000100fc3171 _ZN9GfxDevice12ExecuteAsyncEiPFvPN21GfxDeviceAsyncCommand10ArgScratchEPKNS0_3ArgEEPS2_S5_RK8JobFence + 65
    1666: 18 Unity 0x0000000100be089b _Z27ExecuteDrawRenderersCommandP26ScriptableRenderContextArg + 699
    1667: 19 Unity 0x0000000100bf1216 _ZN23ScriptableRenderContext27ExecuteScriptableRenderLoopEv + 1718
    1668: 20 ??? 0x00000001409ecbc6 0x0 + 5379115974
    1669: 21 ??? 0x000000013f55e3e3 0x0 + 5357560803
    1670: Debug info from gdb:
    1671: (lldb) process attach --pid 11291
    1672: [Unity] -------- GLSL link error: WARNING: Output of vertex shader 'vs_TEXCOORD6' not read by fragment shader
    1673: [Unity] ERROR: Input of fragment shader 'vs_TEXCOORD2' not written by vertex shader
    1674: [Unity] ERROR: Input of fragment shader 'vs_TEXCOORD1' not written by vertex shader[ICODE]
    [code=CSharp]1631: [Unity] Updating Assets/NatureManufacture Assets/L.V.E- Lava and Volcano Environment/Particles/Materials/Vulcano Smoke.mat - GUID: fde44d9fc5af87b45a4b312852d58e09...
    1632: [Unity] Shader 'Lightweight Render Pipeline/Particles/Lit': fallback shader 'Lightweight Render Pipeline/Particles/SimpleLit' not found
    1633: [Unity] WARNING: RGBA Compressed PVRTC 4BPP UNorm format is not supported, decompressing texture
    1634: [Unity] WARNING: RGB Compressed PVRTC 4BPP UNorm format is not supported, decompressing texture
    1635: Unity(11291,0x7fffac216380) malloc: *** error for object 0x1168e4020: pointer being freed was not allocated
    1636: *** set a breakpoint in malloc_error_break to debug
    1637: Stacktrace:
    1638: at <unknown> <0xffffffff>
    1639: at (wrapper managed-to-native) UnityEngine.Experimental.Rendering.ScriptableRenderContext.Submit_Internal_Injected (UnityEngine.Experimental.Rendering.ScriptableRenderContext&) [0x00007] in <87f35bae0d0044ee81a6d75ba47715a8>:0
    1640: at UnityEngine.Experimental.Rendering.ScriptableRenderContext.Submit_Internal () [0x00001] in <87f35bae0d0044ee81a6d75ba47715a8>:0
    1641: at UnityEngine.Experimental.Rendering.LightweightPipeline.LightweightRenderPipeline.RenderSingleCamera (UnityEngine.Experimental.Rendering.LightweightPipeline.LightweightRenderPipeline,UnityEngine.Experimental.Rendering.ScriptableRenderContext,UnityEngine.Camera,UnityEngine.Experimental.Rendering.CullResults&,UnityEngine.Experimental.Rendering.LightweightPipeline.IRendererSetup) [0x0012b] in /BUILD_PATH/sugastudio.heroes.iah-ios-app-store-master/Library/PackageCache/com.unity.render-pipelines.lightweight@4.6.0-preview/Runtime/LightweightRenderPipeline.cs:225
    1642: at UnityEngine.Experimental.Rendering.LightweightPipeline.LightweightRenderPipeline.Render (UnityEngine.Experimental.Rendering.ScriptableRenderContext,UnityEngine.Camera[]) [0x00064] in /BUILD_PATH/sugastudio.heroes.iah-ios-app-store-master/Library/PackageCache/com.unity.render-pipelines.lightweight@4.6.0-preview/Runtime/LightweightRenderPipeline.cs:172
    1643: at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object_object_intptr (object,intptr,intptr,intptr) [0x0002c] in <87f35bae0d0044ee81a6d75ba47715a8>:0
    1644: at <unknown> <0xffffffff>
    1645: at (wrapper managed-to-native) UnityEngine.Camera.Render (UnityEngine.Camera) [0x00013] in <87f35bae0d0044ee81a6d75ba47715a8>:0
    1646: at (wrapper runtime-invoke) <Module>.runtime_invoke_object_object_object_object (object,intptr,intptr,intptr) [0x0002b] in <2ac79605430c481986a0230bb69649f6>:0
    1647: Native stacktrace:
    1648: 0 libmonobdwgc-2.0.dylib 0x00000001394aa9a6 mono_handle_native_crash + 242
    1649: 1 libsystem_platform.dylib 0x00007fff73e0bf5a _sigtramp + 26
    1650: 2 ??? 0x00000001177d9b80 0x0 + 4689075072
    1651: 3 libsystem_c.dylib 0x00007fff73ba91ae abort + 127
    1652: 4 libsystem_malloc.dylib 0x00007fff73ca7822 free + 521
    1653: 5 Unity 0x0000000100df4c6f _Z29GetSubProgramForShaderSnippetP6ShaderPN9ShaderLab4PassERK13ShaderSnippet10ShaderTypejRK16ShaderKeywordSetRK12fixed_bitsetILi28EjEPK13dynamic_arrayIS8_Lm0EE22ShaderCompilerPlatformR19ShaderSnippetResultR17ShaderChannelMask18ShaderRequirements + 463
    1654: 6 Unity 0x0000000100e1d225 _ZN9ShaderLab7Program23CompileShaderSubProgramEP6ShaderPNS_4PassERK13ShaderSnippetjR16ShaderKeywordSetR19ShaderSnippetResultR17ShaderChannelMask18ShaderRequirements + 693
    1655: 7 Unity 0x0000000100e1da26 _ZN9ShaderLab7Program25CompileMatchingSubProgramEP6ShaderPNS_4PassERK16ShaderKeywordSetjPS5_R19ShaderSnippetResult + 1382
    1656: 8 Unity 0x0000000100e1aaf1 _ZNK9ShaderLab7Program21GetMatchingSubProgramEPK6ShaderPKNS_4PassERK16ShaderKeywordSetjPS7_R19ShaderSnippetResult + 449
    1657: 9 Unity 0x0000000100e275c6 _ZNK9ShaderLab11ShaderState20FindSubProgramsToUseEPK6ShaderPKNS_4PassERNS_11SubProgramsERK17ShaderPassContext + 662
    1658: 10 Unity 0x0000000100e27bf6 _ZNK9ShaderLab11ShaderState16ApplyShaderStateEjPK19ShaderPropertySheetRK17ShaderPassContextP6ShaderPNS_4PassEPNS_11SubProgramsEPK22DeviceRenderStateBlock + 134
    1659: 11 Unity 0x0000000100e19f56 _ZN9ShaderLab4Pass9ApplyPassEjPK19ShaderPropertySheetR17ShaderPassContextP6ShaderiPKNS_10GrabPassesEPNS_11SubProgramsEPK22DeviceRenderStateBlock + 310
    1660: 12 Unity 0x0000000100dae465 _Z26ApplyMaterialPassWithCacheRK18SharedMaterialDataR17ShaderPassContextP6ShaderPN9ShaderLab4PassEibPKNS6_10GrabPassesEPNS6_11SubProgramsEPK22DeviceRenderStateBlock + 1029
    1661: 13 Unity 0x0000000100dbaca6 _Z37ApplyMaterialPassAndKeywordsWithCacheRK18SharedMaterialDataR17ShaderPassContextP6ShaderPN9ShaderLab4PassEibPKNS6_10GrabPassesEPNS6_11SubProgramsEPK22DeviceRenderStateBlock + 134
    1662: 14 Unity 0x00000001009750fa _ZN13BatchRenderer15ApplyShaderPassER17ShaderPassContextPK18SharedMaterialDataP6ShaderPN9ShaderLab4PassEi13BatchingFlagsbbPKNS7_10GrabPassesEPK22DeviceRenderStateBlock + 394
    1663: 15 Unity 0x0000000100bde62e _Z24ScriptableRenderLoopDrawPK24ScriptableLoopObjectDatamRK19SharedRendererSceneRK20DrawRenderersCommandR17ShaderPassContextR9GfxDevice + 3934
    1664: 16 Unity 0x0000000100be3ebe _ZL23ScriptableRenderLoopJobPN21GfxDeviceAsyncCommand10ArgScratchEPKNS_3ArgE + 174
    1665: 17 Unity 0x0000000100fc3171 _ZN9GfxDevice12ExecuteAsyncEiPFvPN21GfxDeviceAsyncCommand10ArgScratchEPKNS0_3ArgEEPS2_S5_RK8JobFence + 65
    1666: 18 Unity 0x0000000100be089b _Z27ExecuteDrawRenderersCommandP26ScriptableRenderContextArg + 699
    1667: 19 Unity 0x0000000100bf1216 _ZN23ScriptableRenderContext27ExecuteScriptableRenderLoopEv + 1718
    1668: 20 ??? 0x00000001409ecbc6 0x0 + 5379115974
    1669: 21 ??? 0x000000013f55e3e3 0x0 + 5357560803
    1670: Debug info from gdb:
    1671: (lldb) process attach --pid 11291
    1672: [Unity] -------- GLSL link error: WARNING: Output of vertex shader 'vs_TEXCOORD6' not read by fragment shader
    1673: [Unity] ERROR: Input of fragment shader 'vs_TEXCOORD2' not written by vertex shader
    1674: [Unity] ERROR: Input of fragment shader 'vs_TEXCOORD1' not written by vertex shader[/code]
     
  5. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    574
    That's not an LWRP change that's an editor change since 2017.2.

    Option 1
    Go to the model in your project view and select it
    In the inspector for the imports settings and select Materials
    There you will see a button that says "Extract Materials" select that

    Option 2
    Select the arrow next to the model in the project view
    Select the materials underneath it
    Right-click and Extract From Prefab

    Guessing you haven't used a version since 2017.2 has been released until now
    What you should know

    Release notes
    upload_2019-1-1_10-21-58.png
    upload_2019-1-1_10-21-25.png
     
    phil_lira, Shorely and hippocoder like this.
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,919
    AO is not currently supported as post effect. The whole idea behind LWRP is that it's fast. AO has never been fast. They may change this in future, and allow people to make it slow again then they can also complain too! :D
     
    phil_lira and P_Jong like this.
  7. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    Not within Post Processing Stack itself, but if you do a quick google, there are quite a few open source real-time AO solution for LWRP. There are also store asset like Amplify Occlusion now supports LWRP too.

    But performance won't be great on less powerful hardware. One solution we checked took > 5ms on Intel GPU rendering to 720p.
     
    phil_lira and P_Jong like this.
  8. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,919
    I see, well you could look at using the progressive lightmapper. I think that would be a way of getting at AO data potentially - it has an API for that sort of thing. But most people will simply automatically generate AO textures as part of the art pipeline. Most artists don't think about AO any more. It's just there, provided by substance or other DCC package.
     
    P_Jong and Shorely like this.
  9. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    Just to be clear:

    - Post Processing Stack is for real-time AO.
    - If you want to bake per-scene AO into light map, you are talking about light mapper.
    - If you want to bake AO maps per-object, you want to do it with another tool.

    Screen Shot 2019-01-02 at 11.45.16.png

    Now, if you can't seem to bake AO properly within Unity: adjust resolution, samples and AO settings. (And I don't need to tell you the light need to be "baked" and objects need to "static" etc.)

    ==== all above answers are not LWRP specific, if you have a LWRP specific issue, read below ====

    If it still doesn't work and *only* doesn't work with LWRP Lit shader: setup on a simple scene, bake with Built-in pipeline then bake with LWRP pipeline using the same settings. Screenshot the difference, report it here and to bug tracker. It's the fastest way to get your issue resolved.

    It would also be pretty helpful to know which version of Unity and LWRP you are on. As I haven't encounter AO baking issue myself.

    Also note the light attenuation works differently in LWRP, not sure if it affects AO baking, but the result would look different, it's something you need to account for.

    As for the lack of doc, I feel you, I have made a searchable unofficial site: https://bitinn.github.io/ScriptableRenderPipeline/LWRP/lit-shader/
     
    Last edited: Jan 2, 2019
    noio and P_Jong like this.
  10. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,919
    To be clear I referred to the AO (occlusion texture) in LWRP lit shader, and mentioned the progressive lightmapper as a way of generating AO texture data since he seemed to be insistent about it being generated in Unity, and did not mention lightmapping.

     
  11. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    The best help I can give at this point:

    - Setup a test scene.
    - Bake with built-in pipeline, screenshot
    - Bake with LWRP, screenshot
    - Screenshot the settings of your light mapper.
    - Report everything here, show us the difference, along with your Unity version and LWRP version.
    - Wait for LWRP team or more knowledgeable member for some advise.

    Sadly I don't know a magic setting that will fix your issue as we don't have the full scope of you issue.

    Hope this helps.
     
  12. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    Please consider the possibility that you mess up something and don't even know it, and your reluctance to share more info are just going make this difficult for yourself :)
     
    noio and P_Jong like this.
  13. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    A quick scene to demonstrate AO baking works in LWRP:

    Screen Shot 2019-01-02 at 12.58.14.png Screen Shot 2019-01-02 at 12.58.17.png
     
    P_Jong and Shorely like this.
  14. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    Short answer:

    LWRP isn't the issue, you need to understand AO baking in Unity.

    Long answer:

    Unfortunately, the Lightweight RP (Preview) template is precisely the worst baseline you can have, why?

    - It use an outdated version of LWRP package.
    - It depends on your version of Unity (which you still haven't disclosed).
    - It obfuscates the things you want to learn: AO baking. Anything else is a distraction.

    What you should do:

    - Start from an empty scene to understand AO baking.

    Here is my setup:

    (Yes, there is no light in my scene, just ambient source.)

    Screen Shot 2019-01-02 at 13.33.58.png Screen Shot 2019-01-02 at 13.33.16.png Screen Shot 2019-01-02 at 13.33.01.png

    To add:

    - Don't ask people to show you everything, you gotta try it yourself and show people what's not working so they can help.

    - LWRP thread isn't the best place to get your answers, because your issue isn't LWRP related. It's Unity GI related. There is a forum for that.
     
    noio, P_Jong and Lars-Steenhoff like this.
  15. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    198
    Hi, thank you for your reply.
    I tried to reproduce the GFX.WaitForPresent spike on a test project, but I couldn't. Maybe I need to instantiate more objects? I don't want to bother you by uploading the whole project...

    For crash that occurs when using MSAA 2x on a Mac Mini 2014, it always happens on a fairly empty project. Unity 2018.3.0f2 + LWRP v4.6.0-preview. It does not occur on my iMac, so this issue might be hardware-specific one. Do you want me to submit a report?
     
  16. Deleted User

    Deleted User

    Guest

    Many thanks, I found out there is fix from Amplify after my post submission. I will try right away.
     
  17. Deleted User

    Deleted User

    Guest

    Hi Again!

    I've managed to convert the Beffio shaders to LWRP 4.6.0 and Unity 2018.3.0f2. It seems to work but a new rendering artifact has come up (not visible in LWRP 3.0.0) as per this picture (look at the mesh pixelation around the mouth, 1st picture). It seems to come with the Culling Mask - Postprocessing with the MainLight_PB realtime light. Please see below. Any ideas if a bug or lighting setting? Many thanks image (1).png

    image (2).png !
     
  18. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    This is just a guess, but the likely issue is your object normal conversion is somehow wrong (or the object itself has non-smooth normal and somehow the original shader was overwriting it).

    You might have better luck posting your graph screenshot to ASE thread (if you are using ASE).
     
  19. Deleted User

    Deleted User

    Guest

    Many thanks for your input. Here comes the ASE screenshot of the affected shader:
    image_comp.png
     
  20. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    389
    Hi, thanks again for looking at it. I've poked VR team about it.
     
    equalsequals likes this.
  21. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    2,181
    No they meant post in the ASE forums. This is not for ASE, ASE is not official, it is 3rd party and as such this is not really the place, even though it is sort of related to SRP.
     
  22. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    164
    Hey Shorely,

    I recently worked on updating the template scene internally so I have a good understanding of it.

    Some of the main reasons starting from there will be not giving you great AO output will be mainly two things:
    • The default resolution of the bake is super low, this is so that when opening the template users won't have to wait ages for a light bake to happen before seeing a nicely lit scene
    • The second issue is that there is some pretty heavy post blurring happening, this is the filtering options under 'Lighting' settings, this is to clean up any incorrect bake artefacts that come with such a low resolution light bake, essentially adding a gaussian blur to the light maps(and also the AO) and since the AO is considered 'Indirect' lighting the blur amount is quite hefty
    • Direct Contribution(which is what you need for that shot of the wheels) is set very low in the template, at 0.3 it will be barely visible there since it is being lit by a light directly, try cranking this up
    I would suggest turning the filtering to 'None' then switching to the 'Baked Lightmap' scene view mode to see if you have enough resolution, you will need a fair amount to pickup the AO detail around the bottom of those wheels.
    Also to make things easier to see, start with some very high AO contribution levels, then dial it back, where you want the AO in that shot with the wheels is being lit with direct light so you will want to make sure 'Direct Contribution' is set to a value(by default this is 0, and in the template 0.3, lower values are more physically correct though).
     
    Shorely and sand_lantern like this.
  23. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    164
    An easy quick test here would be to add a new material with the LWRP Lit shader and see if the issue goes away, if it does, it's the shader that's the issue, but I have a feeling something has gone wrong with the mesh at import time and you have lost the correct smoothing.
     
  24. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    389
    I've quickly check this. It was an issue when using gamma color space. I've opened a PR with a fix and it should land soon: https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/2696

    The reason it was dependent on renderscale and HDR is because it affects only rendering when rendering to an intermediate render texture, which happens in those cases.
     
    Prodigga likes this.
  25. lxmllr

    lxmllr

    Joined:
    Mar 27, 2018
    Posts:
    6
    Hello everyone!

    So I've just updated my project to 2019.1 and the RP packages to 5.2.3. I know that multiple cameras is one of the features that needs to change with these updates, but I don't fully understand the process of what I need to add to support this (e.g. using a second camera / render pass for a simple skybox). Can anyone point me to a resource that explains which parts of the render pipeline need to be extended to allow for this? Thank you
     
    Lars-Steenhoff likes this.
  26. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,273
    ^ This

    Don't understand what used to be simple
     
    GameDevCouple_I and lxmllr like this.
  27. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    A quick question:

    What additional benefit do I gain from using UNITY_INSTANCING_BUFFER_START in the UnityInstancing.hlsl over the simpler CBUFFER_START?

    Almost all LWRP shaders are written with CBUFFER_START instead of UNITY_INSTANCING_BUFFER_START, so is there virtually no difference?

    (CBUFFER_START is defined per API so I am not sure when we should use UNITY_INSTANCING_BUFFER_START besides it was the naming for built-in pipeline)

    EDIT: and for that matter, do we need UNITY_ACCESS_INSTANCED_PROP at all?

    EDIT2: core's "UnityInstancing.hlsl" is included with LWRP's "Input.hlsl", but most of the API is not used by LWRP or Shader Graph, so color me a bit confused.

    Thx
     
    Last edited: Jan 4, 2019
    noio likes this.
  28. Go3k

    Go3k

    Joined:
    Oct 21, 2015
    Posts:
    16
    Im using this function in 'RenderPipeline.beginCameraRendering' to get a UI blur effect, it works fine on standard render pipeline, but failed on LWRP. More details here: (https://forum.unity.com/threads/lwrp-graphics-blit-failed.606166/).

    Code (CSharp):
    1. Graphics.Blit(rt, null as RenderTexture, blurMaterial, 0);
    Any help?
     
  29. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    Admittedly I haven't looked at your source code closely, but I think you are using multiple cameras, and expect to use result from one camera on another.

    AFAIK, this doesn't work in LWRP, see:

    https://forum.unity.com/threads/lwr...5-2-1-19-1-are-out.562291/page-5#post-4024615
    https://forum.unity.com/threads/glitching-with-multiple-cameras-lwrp.592477/

    But if you just want a blur scene as UI background, perhaps the LWRP's own Opaque Texture pass can help.

    Screen Shot 2019-01-04 at 14.45.45.png

    It will be different from Built-in pipeline's solution, but perhaps easier to implement once you know how to do it, see these examples:

    https://github.com/UnityTechnologies/LWRPScriptableRenderPass_ExampleLibrary
     
    phil_lira and Go3k like this.
  30. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    Another quick question:

    Why are both "IgnoreProjector" and "IgnoreProjectors" tag being used in different shaders in LWRP? Are they both valid? Projectors don't work in LWRP anyway, do they still serve the purpose?

    (Unlit shader use IgnoreProjectors while SimpleLit and Lit shader use IgnoreProjector, so perhaps a typo?)
     
  31. Go3k

    Go3k

    Joined:
    Oct 21, 2015
    Posts:
    16
    Thanks so much:D
     
  32. coffeediction

    coffeediction

    Joined:
    Nov 3, 2016
    Posts:
    2
    Hi guys, It seems that LWRP doesnt support transparency properly.
    After converting my glass materials of a door (albedo alpha -> transparency), to LWRP, its just only opaque, I tried all the options available, its either 100% opaque or completely invisible.
    I exported the textures from Substance Painter, before 2018.3 without LWRP/HDRP it was working pretty well.
    Any idea what is going on?
    Thanks!
    EDIT: I figured something out, even tho I dont know WHY it wants me to have it this way, doesnt make much sense of using the alpha channel for transparency control anymore, anyways, one small problem appears still...
    This is a double glass, it has been placed on both sides of the door, it has a sticker wich is opaque, from one side the sticker is fine, and you can clearly and pretty well see that there is another one on the other side, so you see the backside of it, so far so good, but if you move to the other side of the door, this isnt the case anymore.
    Normal door glass with transparency and stickers are opaque:


    Looking good transparency and backface sticker is opaque and realistically rendered.


    The other side same thing was expected, but the front sticker is getting render issues from the other side's sticker.

    So basically from the other side, the front sticker overlaps with the backside one, creating weird rendering issues. Please note, this isnt a "doubleside" window, its a double window, with doubleside rendering. 2 Different meshes, same UV, same texture :)
    I had to use Metallic alpha to get some transparency to show up, before any new Rendering Pipeline it was Source: Albedo Alpha. I kinda dont seem to get what's going on.

    Thanks for any help!


    Attachments: Some more screenshots of the settings below.

    https://i.imgur.com/v4ek1jh.png
    https://i.imgur.com/IYAC1ho.jpg
    https://i.imgur.com/fNYnPn7.png
    https://i.imgur.com/7E6TBlb.png
     
    Last edited: Jan 5, 2019
  33. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    164
    This is happening because of how transparent objects are rendered, you've done half the steps to get it working correctly(2 separate objects) but you need to make sure the pivots of the two objects are in the right place, since transparent objects are rendered back to front and I'm guessing what is happening here is that your pivots for both inner door glass and outer door glass sit at the same point in space, this will mean that the engine cannot render them in the correct order. If you make sure the pivot of the glass is moved to be on the correct side of the door then the rendering order will be correct.
     
  34. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    164
    We are planning to have a better AO solution for LWRP, in the form of a post effect, this will mean much easier to configure and will not require baking it in(dynamic objects will work too) but right now the current Unity AO solutions are too heavy for mobile usage. There are some very dirty versions you can do quite easily as a post effect with only a depth map, but the results are very basic. We are hoping to find a nice intermediate this year which works well on both a 10 year old phone and still look pretty nice.
     
    noio likes this.
  35. lxmllr

    lxmllr

    Joined:
    Mar 27, 2018
    Posts:
    6
    Trying to bump this again with something a bit more specific..

    So this chunk was taken from the LWRP.cs Render() function:
    Code (CSharp):
    1.             SortCameras(cameras);
    2.             foreach (Camera camera in cameras)
    3.             {
    4.                 BeginCameraRendering(camera);
    5.  
    6.                 foreach (var beforeCamera in camera.GetComponents<IBeforeCameraRender>())
    7.                     beforeCamera.ExecuteBeforeCameraRender(this, renderContext, camera);
    8.  
    9.                 RenderSingleCamera(this, renderContext, camera, camera.GetComponent<IRendererSetup>());
    10.             }
    I know you guys have said you're working on documentation but getting a look at something in-progress would be better than nothing at all right now. It's been kinda hard to hunt and peck around the files to figure it out for myself. Any kind of info about this array of cameras getting passed in, how it is supposed to be used, and if this is the correct spot to start extending it's behavior? Thanks again.
     
    Last edited: Jan 8, 2019
  36. richardzzzarnold

    richardzzzarnold

    Joined:
    Aug 2, 2012
    Posts:
    72
    LightweightRenderingPipeline seems to be incompatible with Unity 2019.
    In 2018 my project was working fine with LWRP, but nowI am just getting a pink screen and loads of errors such as:

    Library/PackageCache/com.unity.render-pipelines.lightweight@5.2.3/Editor/ShaderGraph/LightWeightPBRSubShader.cs(5,19): error CS0234: The type or namespace name 'Graphing' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)
     
    Last edited: Jan 9, 2019
  37. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    574
    Right click on the package folder and select reimport all and that should fix it. For me, it fixed some of my projects and other when I update to the latest 2019.1 Alpha a13. Not sure why but it's something to keep in mind if you are on an older version.
     
  38. lxmllr

    lxmllr

    Joined:
    Mar 27, 2018
    Posts:
    6
    I'm sorry, but
    isn't really enough for me to go on. How do I add a ScriptableRenderPass? How do i Inject the RP code?
     
  39. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    lxmllr likes this.
  40. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    One more question (not holding my breath since my previous 2 Qs wasn't getting answers...):

    UNITY_USE_NATIVE_HDR, this flag is only used once in the entire SRP project, but has no documentation. Is it referring to HDR flag on camera or the HDR flag on LWRP asset? Is it hardware dependent?

    It's used to decide whether indirect specular should decode HDR environment to RGB. But the result is returned as such:

    Code (CSharp):
    1.  
    2. #if !defined(_GLOSSYREFLECTIONS_OFF)
    3. half mip = PerceptualRoughnessToMipmapLevel(perceptualRoughness);
    4. half4 encodedIrradiance = SAMPLE_TEXTURECUBE_LOD(unity_SpecCube0, samplerunity_SpecCube0, reflectVector, mip);
    5.  
    6. #if !defined(UNITY_USE_NATIVE_HDR)
    7. half3 irradiance = DecodeHDREnvironment(encodedIrradiance, unity_SpecCube0_HDR);
    8. #else
    9. half3 irradiance = encodedIrradiance.rbg;
    10. #endif
    11.  
    12. return irradiance * occlusion;
    13. #endif // GLOSSY_REFLECTIONS
    14.  
    In particular, I don't understand why encodedIrradiance.rbg is returned when the flag is set, does Unity store HDR environment image differently? As in storing Blue color in Green channel as Sky is more likely Blue or something?
     
  41. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    389
    That's a bug. Thanks for reporting it. We have a PR on github to fix it.
     
  42. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    389
    Reflection Probes (as lightmaps) might be encoded in native HDR texture (16bit per channel or BC6H) or encoded in either RGBM or dLDR. If UNITY_USE_NATIVE_HDR is set that means the texture is not encoded and we just sample it without decoding. Otherwise we decode by calling DecodeHDREnvironment and that depends on the encoding type (RGBM/dLDR) and the colorspace.

    As for how they are encoded. It depends on the platform and your project settings.
    Settings that affect it are LightmapEncoding in PlayerSettings -> Other Settings.
    For mobile, it will default to dLDR, unless you override the Texture Compression setting. Then it will depend if the device supports and in the PlayerSettings.
     
    bitinn likes this.
  43. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    389
    Regarding the ScriptableRenderPass architecture. This piece of API we left under experimental namespace because we are not yet comfortable with it. We are investigating how to make it easier to setup and inject custom render passes. That's why we didn't start writing docs on it yet.

    If you used it and have feedback on it now it's the time to help shape the API :D
     
  44. MythrilMan51

    MythrilMan51

    Joined:
    Apr 24, 2017
    Posts:
    122
    Any news on premultiply yet? I hate talking like a broken record, but the blend mode's bugged, Acting more like an alpha blend.
     
  45. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    554
    I am seeing some strange behavior with Reflection Probe baking when using a metallic = 1, smoothness = 1 material.

    I adjust environment light bounce between 2 and 5, and the black faces remain.

    Screen Shot 2019-01-13 at 3.28.07.png Screen Shot 2019-01-13 at 3.28.14.png

    Is this a known issue for LWRP 4.6.0 + Unity 2018.3?

    The more confusing thing is the face might bake just fine in some cases:

    Screen Shot 2019-01-13 at 3.49.07.png Screen Shot 2019-01-13 at 3.49.21.png

    I will open a ticket later, not sure this is hardware dependent or not, but I am on macOS + Metal API + Intel GPU.

    EDIT: This issue is now reproduced in 2018.3.1f and opened as case 1116857
     
    Last edited: Jan 13, 2019
    phil_lira likes this.
  46. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    501
    Shadowmask lighting coming to LWRP?
     
  47. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    389
    Hey Mythril, sorry about that. What's the issue you're seeing, I might have missed it. Does you have a case number. We support premultiply in the Lit shader.
     
  48. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    389
    It will be supported. I don't have an ETA for you atm but we are working on a public roadmap for LWRP so we can make clear what's missing in comparison with Built-in and when it's being supported.

    Most of the work in 19.1 will be focusing on adding features to LWRP so it to becomes feature parity with Unity. The exception are some Built-in features we want to deprecate, but we will look to provide alternatives for things like GrabPass, ShaderOverride, Camera Stacking, and so on.
     
  49. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    362
    Hi
    Sorry for my ignorance but I am working with VR projects and I am interested in learning about LWRP, for it, Could anybody advice about course or tutorial about it?
    Thanks in advance
    Castana
     
  50. Immu

    Immu

    Joined:
    Jun 18, 2013
    Posts:
    154
    Hi LWRP preview 4.7.0 has been released (2018.3.1.f1) but I don't see any notes in the changelog.
    Could we have details before I update from 4.6.0 ?
     
    Shorely likes this.
Thread Status:
Not open for further replies.