Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[Released] Lux URP Essentials

Discussion in 'Assets and Asset Store' started by larsbertram1, Jul 18, 2019.

?

Does Lux URP Essentials need a Discord Server?

Poll closed Apr 29, 2021.
  1. yes - even if there was no moderator

    4 vote(s)
    57.1%
  2. no, the forum is all we need

    3 vote(s)
    42.9%
  1. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    the water shader was optimized for speed - but real time planar reflections are quite heavy and do not play well with streams and rivers which were on my mind when writing the shader.
     
    drewvancamp likes this.
  2. drewvancamp

    drewvancamp

    Joined:
    Oct 9, 2015
    Posts:
    3
    Ok, well thank you for letting me know. I guess I'll have to rethink my approach and get creative.
     
  3. h1ggs

    h1ggs

    Joined:
    Dec 21, 2017
    Posts:
    12
    Hello I'm using URP version 12.1.8 with unity version 2021.3.15 and a few of my shaders that use Lux Extended Uber have a green hue to them in the build. I'm also using addressables.

    Is there a way to fix this problem? I have about 20+ materials that use the same shader and look fine. For some reason one of them that only has a white-grey basemap has this problem.

    I should also add that the closer the camera gets to the material, the green dissapears. It seems to be distance/depth based?

    solved- needed to include the layer those parts were on to the Opaque layer mask in the renderer.
     
    Last edited: May 26, 2023
  4. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,195
    @larsbertram1

    Hey, I'm unable to get Lux URP (1.95a) working in Unity 2022.3.0f1 with URP 14.0.7. After installing your asset and then installing LuxURPEssentials_URP_12.1, the Human Demo is pink. Thoughts? Thanks.
     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    make sure you download the package with unity 2022.x. then you will get the latest for urp 14.
    if it does not show the proper version number in the lux urp essentials welcome screen you may have to delete your asset store download cache.
    i haven't checked 2022.3 but it runs fine in 2022.2.x
    LuxURPEssentials_URP_12.1 is for urp 12.1. and does not run.
     
  6. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,195
    I've downloaded Lux in a fresh project using 2022.3. How am I able to download with urp 14?
     
  7. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,195
    I also installed 2022.2.21, created a new project, then installed the latest Lux.
    Nevermind, looks like it worked out-of-the-box. I guess I downgraded when I ran the 12.1 asset thinking I needed to install that in order to get it to work, instead of just opening the demo scenes. haha Oops!
     
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
  9. Macahrio

    Macahrio

    Joined:
    Aug 17, 2013
    Posts:
    3
    Hi. I'm trying to upgrade my project to version 2022.3.1 LTS, I've updated Lux to 1.95a. All shaders compile with the exception of the Glass and Water. Both with the same error:

    Shader error in 'Lux URP/Water': 'SAMPLE_GI': Too few arguments to a macro call. at line 525

    Shader error in 'Lux URP/Glass': 'SAMPLE_GI': Too few arguments to a macro call. at line 455

    Is there any solution?
     
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    i have no errors in 2022.3.0!
    but as a quick workaround you can try:

    in the glass shader find:
    inputData.bakedGI = SAMPLE_GI(input.lightmapUV, input.vertexSH, inputData.normalWS);

    and replace it with:
    #if defined(DYNAMICLIGHTMAP_ON)
    inputData.bakedGI = SAMPLE_GI(input.lightmapUV, input.lightmapUV, input.vertexSH, inputData.normalWS);
    #else
    inputData.bakedGI = SAMPLE_GI(input.lightmapUV, input.vertexSH, inputData.normalWS);
    #endif
     
  11. Macahrio

    Macahrio

    Joined:
    Aug 17, 2013
    Posts:
    3
    Thanks!

    After making the change you suggested there was an error on the line:
    inputData.shadowMask = SAMPLE_SHADOWMASK(input.staticLightmapUV);

    I replace it with:
    inputData.shadowMask = SAMPLE_SHADOWMASK(input.lightmapUV);
    And it worked.

    In the Water shader I identified
    inputData.bakedGI = SAMPLE_GI(input.staticLightmapUV, input.vertexSH, inputData.normalWS);

    and replace with:
    #if defined(DYNAMICLIGHTMAP_ON)
    inputData.bakedGI = SAMPLE_GI(input.staticLightmapUV, input.staticLightmapUV, input.vertexSH, inputData.normalWS);
    #else
    inputData.bakedGI = SAMPLE_GI(input.staticLightmapUV, input.vertexSH, inputData.normalWS);
    #endif

    And it worked without any errors. :)
     
  12. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    i will add a proper fix shortly...
     
    Macahrio likes this.
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    Version 1.95b is coming which should fix water and glass properly.
     
  14. Jess_AA

    Jess_AA

    Joined:
    May 8, 2019
    Posts:
    38
    I'm using Unity 2021.3.22f1, URP version 12.1.10, having just upgraded from 2019.4.40f1, URP version 7.5.3 (I know!!).I'm seeing a difference in the behaviour of the specular highlight on the Lux glass shader. In 2019 I could increase the Smoothness value of the shader up to 1 with a consistent tightening of the specular highlight. In 2021 however there's no visible difference in the specular highlight beyond 0.9. Do you have any idea why this might be happening?

    This is how it looks in 2019, with the smoothness set to 0.97...
    2019.png
    ...and this is the same setup in 2021.
    2021.png
     
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    hmm, not really. best guess: the glass shader nowadays uses the built in lighting funcction "LightingPhysicallyBased" - which has changed over the time.
     
  16. Jess_AA

    Jess_AA

    Joined:
    May 8, 2019
    Posts:
    38
    OK, thanks. Do you know where I can find this function? Sorry, not a programmer and not too familiar with where this stuff might be :)
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    right out of my head: in the urp package -> shaderlibrary -> lighting.hlsl
     
  18. Introfernal

    Introfernal

    Joined:
    Dec 5, 2017
    Posts:
    9
    The channel remapping on terrain layers is not working with the terrain shader :/
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    right out of my head: no, it does not work automatically as you have to prepare a fitting combined RGBA height map.
     
  20. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    version 1.96 has been submitted.

    ## Version 1.96
    ### Added
    - Added shaders compatible with URP 15.0.6
    ### Fixed
    - Terrain Shader fixed procedural texturing when switching the build platform to Android.
    - Increased lighting BRDF specular max for half float math (mobile) to match the visual look of full float math (desktop) better.
     
  21. Rulez777

    Rulez777

    Joined:
    Aug 17, 2018
    Posts:
    12
    I have encountered issue with URP 14.0.8, project is not building and it throws LUX shader errors.
    Can you upgrade asset to this version of URP?
     
  22. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    which errors?
     
  23. ErgoAaronSum

    ErgoAaronSum

    Joined:
    Mar 6, 2017
    Posts:
    6
    Hello, I tried out this on Unity 2023.1.7f1, URP 15.0.6, Vulkan, Linux.

    I seem to get this error on a almost all the shaders.

    Shader error in 'Lux URP/Nature/Tree Creator Leaves': 'OUTPUT_SH': Too many arguments for a macro call. at Assets/Lux URP Essentials/Shaders/Tree Creator/Includes/Lux URP Creator Leaves ForwardLit Pass.hlsl(89)

    #if UNITY_VERSION >= 202310
    OUTPUT_SH(vertexInput.positionWS, output.normalWS.xyz, GetWorldSpaceNormalizeViewDir(vertexInput.positionWS), output.vertexSH);


    Looking in Lighting.hlsl
        #define OUTPUT_SH4(absolutePositionWS, normalWS, viewDir, OUT)
    #define OUTPUT_SH(normalWS, OUT)


    So changing it to OUTPUT_SH4 seems to work but I haven't looked into if this is the expected behaviour for all shaders.

    Thanks
     
  24. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    this is strange.
    my URP 15.0.6 in 2023.1.5f1 -> lighting.hlsl does NOT define any "OUTPUT_SH4"!
    looking into the latest version on gihub there is a definition for "OUTPUT_SH4" - but that should be a newer version. the commit that introduces "OUTPUT_SH4" is from jun 28. urp 15.0.6 is from jul 12. so it should be in. but it is not here.

    if using "OUTPUT_SH4" fixes the issue for you it should just be fine. they just renamed it.
     
  25. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    ok. updated to 2023.1.8f1 - which comes with urp 15.0.6 as well - but this version is from aug 1st!
    unity, unity! they should have bumped the version number.
     
  26. ErgoAaronSum

    ErgoAaronSum

    Joined:
    Mar 6, 2017
    Posts:
    6
    Yeah it's very strange, I triple checked the version number thinking I was going crazy!
     
  27. asdzhh

    asdzhh

    Joined:
    Jan 20, 2018
    Posts:
    7
    pink on unity2023:(
     
  28. ErgoAaronSum

    ErgoAaronSum

    Joined:
    Mar 6, 2017
    Posts:
    6
    Which render pipeline? Any shader errors? See my post above to fix it for unity 2023.1.7+
     
  29. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    which exact version of unity do you use?
     
  30. REDAXE

    REDAXE

    Joined:
    Jun 30, 2017
    Posts:
    1
    Hi, how to add popup "MaterialGlobalIlluminationFlags" to a Lux UP shader? Thank you
     

    Attached Files:

  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    hmm, most shaders were authored while enlighten was abandoned. so i will have to have a look into this...
    EDIT: so i looked into this. the shader graph shaders just provide it out of the box - even if it does not make much sense in most cases.
    the hlsl shaders do not as most of them simply do not output any emission. exception is the uber shader which will show the associated gui if you enable emission.
     
    Last edited: Aug 27, 2023
  32. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    59
    Hi there!
    AlphaTest related shaders break on Mali GPU android phone(vivo S6 with Exynos 980 Mali G76-MP5).
    The depth prepass is disabled and mssa is also disabled.(on the phone).
    Materials that enabled camera fade(thus the alpha test is also enabled) and hair shader with almost envitable alphaclip(no alpha to coverage enabled) are rendered unproperly.
    The first picture shows abnormal situation, the blocks have the camera fade effect on.
    Also the character's hair is missing cause the alpha test opaque component are missing(or keep whole int strides in some other cases).
    The both materials are set to 2450 queue.
     

    Attached Files:

  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    which version of URP do you use?
    have you tested the shader graph versions as well?
     
  34. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    59
    Unity 2023.1.10f URP 15.0.6.
    Shader graph versions not have been test yet.
     
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    thanks. i looked into the hair shader which actually uses the "official" Alpha() function to handle alpha clipping.so i should work. looking forward to read if the shader graph version works properly.
     
  36. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    59
    The shader graph version hair works fine!
    Screenshot_20230829_181133.jpg Screenshot_20230829_181105.jpg
     
  37. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    59
    How about the camera fade issue?Is there any temporary work around?
     
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    unfortunately no: i just do not have idea why it would not work.
    but the same here: there is a shader graph shader that implements it as well. maybe this one works?
     
  39. WicherP

    WicherP

    Joined:
    Aug 2, 2018
    Posts:
    2
    Hi,

    Unity Verstion: 2022.1.18f1
    Lux Version: 1.96

    I was trying to setup Lux URP Toon HLSL & Outline with Synty Studios assets but when I change shader from Lit everything changes it's original colors. With Lux Lit Extended Uber everything works fine, but with Toon sadly it don't.

    Lit:
    upload_2023-9-2_9-53-38.png

    Toon:
    upload_2023-9-2_9-54-37.png

    Could you please tell me what I need to do to make Toon shader working?

    Also there is only one light source on the scene setup like this:
    upload_2023-9-2_9-56-18.png
     
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    try to add a checkerboard texture instead of your color map. looks like the uvs might be a bit off compared to lit.
    also have a look into the rendering debugger and look at the albedo/diffuse. how do they look?
     
  41. st_Drunks

    st_Drunks

    Joined:
    Nov 8, 2018
    Posts:
    9
    I have an issue using decals for my Meta Quest 2 project.
    For some reason decals seem to move in the scene based on relative player position. At first they seem to be much further back form the spot I place them at, gradually moving to the right location as I move closer.

    This only happens on the device. The editor preview is fine.

    Any ideas on why this is happening?
     
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    which version of urp do you use?
     
  43. st_Drunks

    st_Drunks

    Joined:
    Nov 8, 2018
    Posts:
    9
    Im at unity 2022.3.5f1 hence my URP is capped at 14.0.8
    Should I update?

    I did some poking around and noticed that if I switch graphics API from OpenGLES3 to Vulcan this depth texture issue gets fixed and decals work as intended, but at the same time Vulcan tanks my performance unless I disable MSAA which I’d really rather not sacrifice for the sake of decals.
     
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    this is a difficult question: newer versions of URP do not mean more stable versions by default - unfortunately.
    sometime downgrading is the better choice.
    but as i do not have a quest i can not give any other advice but testing...

    vulkan should be api to go with. and i found some comments/threads regarding it and slow performace in case you enable the depth texture.
    it might be solved in 2023. and earlier versions of urp (10?) might not suffer from this issue as well...

    https://issuetracker.unity3d.com/issues/meta-quest-performance-loss-between-urp-versions-when-built
    https://forum.unity.com/threads/urp...h-depth-texture-enabled.1243393/#post-8535362
     
  45. peacemakers1980

    peacemakers1980

    Joined:
    Sep 12, 2020
    Posts:
    5
    Just bought the package, on a clean project in 2022.3.5f1, downloaded the Lux URP Essentials, but it dosent have any package higher then 12.1, 2022.3 URP is currently on 14.0.8. Is there a download for the unitypackage for URP 14.0.8?
     
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    packages included are only for older versions of urp. if you download the package using 2022 you just get the proper shaders without having to install any further package. simply have a look into the demo scenes :)
     
  47. st_Drunks

    st_Drunks

    Joined:
    Nov 8, 2018
    Posts:
    9
    I’ve ported the project to 2023.1.17f1 and URP 15.0.7
    The issue is still there. Decals won't stay in place unless I use Vulkan and Vulkan with MSAA runs really badly and even runs out of memory and crashes after a short while.
    I guess I’ll just wait this issue out with no decals on Quest for now.
    Thanks for the advice anyway
     
  48. dudleyhk

    dudleyhk

    Joined:
    Sep 27, 2017
    Posts:
    14
    Hi there, I'm using the LightBeam shader for some clouds in my VR scene. I'm getting a black shadowing effect replicating the mesh when I look at that mesh when it's background is the cloud plane.
    It doesn't happen in the editor, headset only. Am using Single Pass, I have depth and opaque textures enabled and I'm using Unity 2022.3.13f1. The same issue isn't happening with other Lux shader's as I'm using the volumetric light beam and skybox in there too. Any clues as to what I might be seeing?? Thanks!
     
  49. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    na, not really. i do not have an idea how it looks if it renders properly :)