Search Unity

[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,212
    i am not sure if i understand you correctly...
    you are using the lux urp foliage shader on objects you place on the terrain as trees?
    if so: i never thought about doing so as foliage is rather small compared to trees. so you would get a lot of "trees" when you tried to paint a field of e.g. ferns.
     
    lilacsky824 likes this.
  2. Object-Null

    Object-Null

    Joined:
    Feb 13, 2014
    Posts:
    59
    good point! but there is no such setting in the skin shader. so that ain't the solution
     
  3. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    which shader are you referring to? the hlsl or shader graph version? hlsl is opaque. sg should be as well by default. but can be changed on the master node/stack.
     
  4. Object-Null

    Object-Null

    Joined:
    Feb 13, 2014
    Posts:
    59
    Well I think then the hlsl one . I'm not really into the shaders. I'll try to find the master node and see if I can change it there.
    Thanks
     
  5. jleemans

    jleemans

    Joined:
    Apr 22, 2020
    Posts:
    18
    Trying to upgrade to Unity 2020.2.4f1
    Testing on URP default project from Unity Hub. I have the same errors on these exact shaders.
    Lux 1.63.0 installed, follow up with installation of LuxURPEssentials_URP_10.2.2.Preview.unitypackage.

    Also the URP used by this version is 10.3.1. The problem come from there probably
     
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    you have to install the luxurpessentials package for 10.2.2. preview located in the lux urp essentails folder.
     
  7. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    740
    im getting full 90hz on my quest 2 without the depth texture turned on, and volumetric materials variables ztest: to lessequal and culling to back. however to have them as ztest to always and culling to front, in order to walk into the volumes. i have to turn on depth texture. while using unity 2020.2, vulkan, urp with urp batcher, the frame rate ends up being about 60hz or so. is there any alternative that makes sense to be able to walk into the volumes without depth texture?, that depth texture does 60hz no matter what direction i look in, even without the volumetrics in the scene. quest 2 is about 4k resolution. not sure if anyone has tried this combination with something like Fixed Foveated Rendering or a different combination on the materials, i would appreciate any suggestions.
     
  8. Sholms

    Sholms

    Joined:
    Nov 15, 2014
    Posts:
    47
    hello, the lux terrain is no working on single pass, I'm using the LuxURPEssentials_URP_10.2.2.Preview

    Shader error in 'Hidden/Lux URP/Lit (Add Pass)': undeclared identifier 'input' at Essentials/Shaders/Terrain/Includes/TerrainLitPasses.hlsl(520) (on d3d11)
     
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    thanks for pointing this out.

    you should be able to fix this by editing line 520 and change it from:
    UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
    to:
    UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
     
    Last edited: Feb 17, 2021
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    i am not aware of any. at least not any that would be as flexible.
    using sdfs? this would hardly support dynamic objects.
    one might think about using a custom pass tho to make only objects effecting the volume render into a custom depth texture. but will this be faster?
     
  11. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    740
    I had to use Fixed Foveated Rendering at high level. it seems to look great on quest 2. and the framerate feels like a stable 90fps , I posted a video, but im not sure how to smoothen the recording. i also uploaded my test version from the video.
    Here's the link to the apk: Zombie Ops VR port for Quest 2 from Zombie Ops Online

     
  12. Sholms

    Sholms

    Joined:
    Nov 15, 2014
    Posts:
    47
    Is there any way to add Mask Map for the smoothness to the lux terrain shader?
     
  13. Streamfall

    Streamfall

    Joined:
    Aug 8, 2011
    Posts:
    40
    Hello, I am unable to find this package in the plugin. It is not included in the package importer within Unity.
    This is strange because I can see the asset when looking at it in the web client Asset Store.

    *fixed, sorry - I had to look back a couple of pages to realize that the cache / download needed to be refreshed.
     
    Last edited: Feb 18, 2021
  14. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    85
    Trying to modified terrain blending shader that can use noise map to blend more naturally.
    Just add sampled noise value to sampled terrain height.
    Hope similar function can be implement officially. :)
    screen_2560x1920_2021-02-22_11-51-14.png
     
    Streamfall and Quique-Martinez like this.
  15. Streamfall

    Streamfall

    Joined:
    Aug 8, 2011
    Posts:
    40
    Really great idea!
     
  16. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    I am having issues with a coupe of the shaders on the Quest 2 (using Unity 2020.2 with the 10.2.2 preview.
    Neither the Water nor the Decal shaders are working. In the demo scene, the water geo is just grey and the decals are invisible. Has anyone else got these to work on the Quest?
    Thanks!
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    you have the enable camera scene and depth texture!
     
    PiAnkh likes this.
  18. Object-Null

    Object-Null

    Joined:
    Feb 13, 2014
    Posts:
    59
    Hello there,

    im still not figured out how i can get shadows from the skin shader.
    any clue where i can change a setting to get shadows? it is just strange that a body with this shader can't cast shadows.

    probleem.jpg

    i can't be the only one with this problem...

    thanks
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    maybe you are... have you checked the shader? does the shadow caster pass error?
     
  20. Fenixake

    Fenixake

    Joined:
    Jan 25, 2014
    Posts:
    162
    or maybe he has disabled the cast shadow on the skinnedmesh
     
  21. zhxhome

    zhxhome

    Joined:
    Feb 1, 2019
    Posts:
    5
    Flat shading does not seem to work properly on mobile, with URP 10.2.2.
    Is it Screenshot_20210304-172032_VFX_URP.jpg
     
  22. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    very strange... any errors in the shaders on export?
     
  23. zhxhome

    zhxhome

    Joined:
    Feb 1, 2019
    Posts:
    5
    Yes, The console only has some irrelevant warnings. I just created a new project, there should be no problem with the configuration, Import Lux URP Essentials1.64 and install LuxURPEssentials_URP_10.2.2.Preview. Then run it on an Android device, the result is the same.
    Editor-
    20210305104433.png
    Android- No shader error is reported on logcat
    Screenshot_20210305-105127_luxShader.jpg
     
    Last edited: Mar 5, 2021
  24. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    really strange. i will have to look into this.
     
  25. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    i have been able to reproduce the bug and fixed it.
    you can fix it yourself:
    edit the "Lux URP Flat Shaded" shader and find around line 319:
    Code (CSharp):
    1. #if defined(_NORMALMAP)
    2.                 //  Here the normal must be normalized!
    3.                     float3 tnormal = SafeNormalize( cross(ddy(input.positionWS), ddx(input.positionWS)) );
    4.                 #else
    5.                     float3 tnormal = cross(ddy(input.positionWS), ddx(input.positionWS));
    6.                 #endif
    and replace it with:
    Code (CSharp):
    1. half3 tnormal = SafeNormalize( cross(ddy(input.positionWS), ddx(input.positionWS)) );
    or wait for the update :)
     
    Fenixake and zhxhome like this.
  26. zhxhome

    zhxhome

    Joined:
    Feb 1, 2019
    Posts:
    5
    Roger that, Thank you for your prompt handling!
     
  27. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    i checked it with urp 7.4.1. 10.2.2. seems to need "normalize" instead of "SafeNormalize" for some reason...
    an update has been submitted.

    Edited: Is available.
     
    Last edited: Mar 8, 2021
    Fenixake likes this.
  28. PerunCreative_JVasica

    PerunCreative_JVasica

    Joined:
    Aug 28, 2020
    Posts:
    16
    @larsbertram1

    Hi,

    two questions:

    1. When using tree creator there is no shadow fade between billboard and 3D mesh (shadows pops in/out without fade), however based on the documentation, this feature should be working. I am refering to this line:

    ..wind and shadows fade in and out over the billboard Fade Length as specified in the terrain settings...

    2. Any chance to have texture-less/math based wind in grass shader? We are tied on memory and we can't afford more render textures.

    Thanks! :)
     
  29. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    ah, this is vr only (just like the label in the material inspector says). the docs are not precise here.

    we will see. in order to get it convincing and versatile it would need quite some math and testing.
     
    PerunCreative_JVasica likes this.
  30. Occuros

    Occuros

    Joined:
    Sep 4, 2018
    Posts:
    49
    Experimented with Unity 2021.1.0f today and noticed that multiple Lux shaders aren't compiling (it uses URP version 11.0)

    Code (CSharp):
    1. Shader error in 'Lux URP/Lit Extended': 'InitializeStandardLitSurfaceData': output parameter 'outSurfaceData' not completely initialized at Inputs.hlsl(183) (on d3d11)
    To reproduce, just install the latest unity release (2021.1.0f) and import the lux package.

    Is this a known issue?
     
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    make sure you import the package for urp 10.3.2.
     
  32. osss

    osss

    Joined:
    Jan 20, 2014
    Posts:
    26
    Unity2021.1f1 + URP11 skin shader will report an error when add point light to scene
    Code (CSharp):
    1. Shader error in 'Lux URP/Human/Skin': 'AdditionalLightShadow': no matching 4 parameter function at Lighting.hlsl(148) (on d3d11)
     
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    there are a bunch of issues with urp 11 (my version for URP 10.3.2. still is flagged "preview" :) ) like the new/old screen space shadows. i will try to address this as soon as possible.
     
    osss likes this.
  34. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    version 1.7 has been submitted adding support for URP 11.


    ## Version 1.7

    ### Added
    - Uber shader: Detail textures added.
    - Foliage and Grass shaders: "Alpha To Coverage" added. Please use it wisely.
    - Cloth STL shader added which uses the S_tandard T_exture L_ayout and stores opacity in the alpha of the base texture.
    - URP 11: Preview for URP 11 added which supports screen space shadows and point light shadows.
    - URP 10 + 11: Depth DepthNormal Only shader added.

    ### Changed
    - URP 11: Optimized vertex to fragment structure according to URP 12.

    ### Fixed
    - Billboard shader: Fixed "receive fog".
     
    lilacsky824 and osss like this.
  35. Ceylan12

    Ceylan12

    Joined:
    Dec 24, 2016
    Posts:
    103
    Hello, I bought this asset generally for clear coat but I had some problems related with clear coat after build. Everything works as excepted in the editor.
    1- When I set the color to white it shown as light blue. I didn't selected second color option.
    https://ibb.co/F311zJW https://ibb.co/n8PyG1r
    2- Camera view become white sometimes (I think when I changed "_ClearCoatThickness", "_ClearCoatSmoothness", "_BaseColor") it stays white until I set this properties again.)
    https://ibb.co/kH8d1Mv
    This things only happen in the build.
    What should I do to solve this problems?
    (There is no error in the console in build)
    URP 7.4.1 Unity 2019.4.16F1
     
  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    weird! are you sure that your code is correct?
    have you tested a white clear coat material (set to white in the editor) and how it looks in builds?
     
  37. Ceylan12

    Ceylan12

    Joined:
    Dec 24, 2016
    Posts:
    103
    I'm sure code the code to set color is correct because it is working in editor and also it was working with URP Lit in build. White clear coat materials is also blue in build.
     
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    what is your build target? URP 7.4.1 has some really strange bugs when it comes to android e.g.
     
  39. Ceylan12

    Ceylan12

    Joined:
    Dec 24, 2016
    Posts:
    103
    Android (I had this problem with URP 7.5.1 and URP 7.4.1) I tested with URP 7.2.1 and both problem is resolved. Thank you.
     
    Last edited: Mar 29, 2021
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    yeah is have been testing it with 7.2.1 as well which works fine here.
     
  41. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    ah, commenting the "#if" in the "CBUFFER_START" "CBUFFER_END" declaration fixes it using URP 7.5.3. as well.
     
    Ceylan12 likes this.
  42. Ceylan12

    Ceylan12

    Joined:
    Dec 24, 2016
    Posts:
    103
    Did you consider to add base map for clear coat shader?
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    hmm, sounds as if you are using an old version?
    i added this months ago. if you open the clearcoat demo you should find something like below.
    if not you are not on latest. clear the assetstore cache and download the package again.

    clearBaseAlbedo.PNG
     
    Ceylan12 likes this.
  44. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    130
    Howdy @larsbertram1
    I just bought the Lux asset and am replacing my old Decal system (also migrated to URP finally! yay).


    I am having a small issue that its best to watch here (on second 10 is most obvious).
    The splat should be visible only on 1 object (but is rendered all over the place, of course).

    In my old decal system I used to solve this problem with layers (decal would project only onto gameobjects of the same layer).
    I read your docs (great docs by the way), but am still unsure how to proceed.
    My current objects are using a custom shader and I don't see access to stencil.
    I believe I can change render depth per material instance, so that may help - if you can only suggest how I would begin to solve this? Just the basic idea would be great.

    Thank you and kind regards,
    Kreso
     
    Last edited: Apr 1, 2021
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    use the frame debugger to watch the order in which the objects are drawn. then tweak the decal material.
     
    Last edited: Apr 1, 2021
    kreso likes this.
  46. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    130
    Thank you for the tip. I may have overestimated my skills.
    The best I succeeded was to change render queue of each material. That helps to not render on some meshes - but it doesn't solve my problem (since everything higher, will always render on lower renderQueue). I need some kind of masking or something. Perhaps what I am trying to do is impossible?

    I never mentioned my desired behavior - is that the decal is rendered only on the right circling saw (not on green walls, or the other circling saw). Also, there would need to be ability to render on the left saw ONLY as well 9not walls, or right saw).

    I honestly didn't know what I was looking for in the debug frame - so another tip can be helpful. :)


    I appreciate your time.

    Kreso
     
    Last edited: Apr 1, 2021
  47. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,212
    that is the right approach.
    in case you want to exclude the decal from certain materials you have to make sure that these are rendered after the decal. so rendering order should be:
    1. draw the mesh that shall receive the decal.
    2. render the decal
    3., 4., 5., render all the rest.

    but using the the render queue is not really the best way of handling this as the used depth buffer is one frame behind.
    and it does not allow you to fancy decal stacking: a decal will always draw on anything below it.
    stencils would give you way more flexibility.

    but to be honest i think using decals here is a very handy but maybe not the right approach in your case.
    actually i would just swap the materials/textures on the circling saws. this might not 100% fit in the moment the switch happens but in case this was annoying you could simply rotate the saws in e.g. 90° steps to make the texture appear at more or less the proper location.

    the frame debugger shows that the decals are drawn at the end of the opaque pass which means that they will affect anything else.
    if you have a look at the decal demo scene and look for the decal that gets rendered on the terrain but not the grass (PF Decal (1) in the hierarchy) and then look into the material settings for decal and grass then you will see that:
    - decal uses queue 2005
    - grass uses 2450
    so grass gets rendered after the decal has been drawn -> no decal on the grass.
     
    kreso likes this.
  48. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    130
    Thanks a lot for your detail & quick response. Duly noted :)
    I think best for me is to go back to my old decals that work as I need them. I'll figure out when it comes another time to update to URP.. Really appreciate your help!
     
  49. Ceylan12

    Ceylan12

    Joined:
    Dec 24, 2016
    Posts:
    103
    (EDIT When I call this line "material.EnableKeyword("_RECEIVE_SHADOWS_OFF");" object doesn't receive shadow but somehow receive shadow checkbox is enabling in material.)
    Hello, I'm using Addressables and I'm getting Addressables build before apk generation. If second color is enabled in shader while getting Addressables build. It behaves like receive shadow is on even if it is closed if not enabled while getting Addressables build there is no problem but it is stripping second color future and It doesn't work in build. What can I do for it? (It looks like there is this problem in editor also. https://ibb.co/8dnKKvf) (Receive shadow is disabled when I start the game in editor but it is receiving shadow even if checkbox disabled. When I open it and close again. It starts to work.
     
    Last edited: Apr 2, 2021
  50. hauwing

    hauwing

    Joined:
    Dec 13, 2017
    Posts:
    50
    hi, may I know is there a performance bench mark test on terrain + default URP shader vs terrain + Lux terrain shader? just want to see the performance impact. Also is it possible to create tyre trail effect on terrain or mesh? thanks.
     
unityunity