Search Unity

Lightweight Render Pipeline for WebGL?

Discussion in 'Web' started by Shizola, May 30, 2018.

  1. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    476
    Is there any info on when this might be available?

    Apparently it's a problem with WebGL not supporting the job system? There is an issue here but no one has replied in a little while - https://github.com/Unity-Technologies/ScriptableRenderPipeline/issues/1238

    Part of the reason I'm interested is because I saw the blog on scriptable shader variants stripping, which the LRP makes a little easier to make use of? I was hoping to use this to minimise initial load times.

    Cheers!
     
  2. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    476
    They said back in March they were aiming to add this in 2018.2 so I don't think it's unreasonable to ask about it.
     
  3. kognito1

    kognito1

    Joined:
    Apr 7, 2015
    Posts:
    331
    Yeah webgl doesn't support threads at the moment (thus no job system). I'm guessing this won't be supported on webgl for a bit.
     
  4. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    We should be able to fix this. stay tuned ;)
     
    bugfinders, savely00 and Shizola like this.
  5. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    I can confirm that it will be fixed in 2018.3 and we should be able to fix it in previous versions as well.
     
    wwweh and Shizola like this.
  6. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    476
    Thanks Marco, appreciate it!
     
  7. wwweh

    wwweh

    Joined:
    Oct 15, 2012
    Posts:
    18
    Awesome news!!!! Go unity!!
     
  8. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    This should be fixed in 2018.1.7f1 soon to be released.
     
    wwweh, Shizola and wetcircuit like this.
  9. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    Was this fixed after all? I just get a black window when I build for WebGL. This is my first Lightweight Render Pipeline project so I don't know if I'm doing something wrong. PC build runs great with no issues. I'm using Unity 2018.2.0b1
     
  10. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    please use the most recent 2018.2 that we just released.
     
  11. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    Right Away! Thanks
     
  12. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    Installed Latest version of Unity but still getting the black window in my webGL build. Maybe I need to try with a fresh project??
     
  13. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    maybe uninstall lwrp package and reinstall?
     
  14. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    ACK!! Updating Pipeline messed up my graph shaders O0

    Edit: Never Mind LOL. My exposed texture maps got reset to "none"
     
  15. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    Ok... Still just a black window
     
  16. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    It might be a different problem because I fixed it and backported it to 2018.2 a month ago. Would you be able to check on 2018.1.7f1 as well?
     
  17. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    tried a fresh project and when I build for WebGL using the demo scene, I get this error in my Browser:

    An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
    WebAssembly support is not detected in this browser.

    Edit: opened a new 3D project (no LWRP) and getting same error in browser.

    not getting the error for games i built previously
     
    Last edited: Jul 13, 2018
  18. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    Unity Hub has not been working for me so going back and forth with Unity versions can be a real pain :/
     
  19. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    So going back to 2017.1.7f1 has fixed new errors but I still get a black window
     
  20. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    I don't think 2017.x supports SRP
     
  21. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46

    OOPS! Sorry, I meant 2018.1.7f1
     
  22. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    So now I've gone back and reinstalled the latest 2018.2 and still getting the same errors with the WebGL builds (with or without LRP)
    error: WebAssembly support is not detected in this browser.
    Guess I'll go back to 2018.2.0b1 for now so I can at lest use WegGL for the non-LRP stuff.
     
  23. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    That seems a browser problem, not Unity's. The default Linker Target is now WebAssembly which is supported by all major browsers. Which browser are you testing with? Maybe an old version.

    If you want to deploy a build that can fallback to asm.js, you can select LinkerTarget=>Both. You can find more infomation in the manual.
     
  24. SuperDanOsbourne

    SuperDanOsbourne

    Joined:
    Oct 3, 2017
    Posts:
    46
    Ah! Thanks. That takes care of that issue. My WebGL build loads in Safari and Chrome now without throwing errors at me. But for the LRP projects, I still have The Black (or Empty?) Window once the Loading is done.
     
  25. Captain_Flaush

    Captain_Flaush

    Joined:
    Apr 20, 2017
    Posts:
    65
    Hello,

    Using the lightweight pipeline, I cannot see the pixel lights in the scene.

    The error from console is:
    Note: Creation of internal variant of shader 'LightweightPipeline/Standard (Physically Based)' failed.
    ERROR: 0:33: 'std430' : invalid layout qualifier: not supported
    ERROR: 0:33: 'binding' : invalid layout qualifier: not supported
    ERROR: 0:33: 'readonly' : Illegal use of reserved word
    ERROR: 0:33: 'readonly' : syntax error

    To test this
    - Create a new project using LWP Sample Scene
    - Add 2 point lights in the scene
    - Change the LRP Settings so you can see all lights as vertex lights
    - Scene shows fine in editor
    - Build for WebGL and notice the issue

    Tested with Unity 2018.2.12f1 and LRP 3.0.0

    Thanks,
    Mihai
     
  26. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    boat attack 2.JPG boat attack1.JPG
    Tried boat attack to test LWRP this was result
     
  27. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    Me, i can't even build for WebGL when i use LWRP - the build just stop, anyone having this issue too ?