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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    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
    actually you are right...
    so in "TerrainLitPasses.hlsl" you can tweak the uvs.
    find line 475 which should look like this:
    #ifndef TERRAIN_SPLAT_BASEPASS
    then select the all line between the #ifndef and #endif and replace them with this code:
    #ifndef TERRAIN_SPLAT_BASEPASS
    #if defined(_PROCEDURALTEXTURING)
    o.uvSplat01.xy = Attributes.positionWS.xz * 0.5;
    #else
    o.uvSplat01.xy = TRANSFORM_TEX(v.texcoord, _Splat0);
    #endif
    o.uvSplat01.zw = TRANSFORM_TEX(v.texcoord, _Splat1);
    o.uvSplat23.xy = TRANSFORM_TEX(v.texcoord, _Splat2);
    o.uvSplat23.zw = TRANSFORM_TEX(v.texcoord, _Splat3);
    #endif

    * 0.5 here is a custom value which will drive the final size of the texture on the terrain which you will have teak to fit your needs.
     
    Last edited: Jan 13, 2021
    EyasSH likes this.
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    unity!
    i checked all urp version from 7.4.1 to 7.5.2.:
    7.4.1, 7.4.2, 7.4.3 and 7.5.1 are fine 7.5.2. is broken.
    so i recommend to down grade to 7.5.1.

    in order to use 7.5.2. you have to edit the "Lux URP Lit Extended Inputs.hlsl" and add:
    float _Surface;
    to the CBUFFER
     
    MP-ul and projectorgames_unity like this.
  3. projectorgames_unity

    projectorgames_unity

    Joined:
    Oct 15, 2018
    Posts:
    107
    Gotta love Unity breaking the API between minor revisions, dontcha?

    That still leaves the
    error tho
     
    MP-ul likes this.
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    i get no error regarding the "Lux URP/Shader Graphs/Lux Transmission Graph Simple" in unity 2019.4.17f1 using urp 7.5.2.
     
    MP-ul likes this.
  5. beauchamp3d_NGP

    beauchamp3d_NGP

    Joined:
    Jun 18, 2020
    Posts:
    1
    Hi all! I am using the LUX URP Skin Shader in my project and I was wondering how can I disable individual lights in the shader code. I want to make it so the shader does not receive light data from the spotlights in the scene.
     
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    commenting the following line:
    #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
    in the pass:
    Pass
    {
    Name "ForwardLit"
    Tags{"LightMode" = "UniversalForward"}
    should make the shader should not add ANY additional lights (spot and point lights).
    if you want to keep the point lights but get rid of the spot lights you would have to hack the lighting function which already contains code to identify point lights (well: for urp < 11 at least).

    but what is about using layers and a proper culling mask on the spot lights?
     
  7. SylvainChague

    SylvainChague

    Joined:
    Nov 20, 2012
    Posts:
    8
    First of all congrats on this great shader pack.

    I wonder, if you would consider adding support for a detail normal map to the skin shader (now that URP 10 supports them on the Lit shader). That would be great to add micro-normals to simulate skin pores for close up.
     
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    worth cosindering it. although this still is urp mostly targeting weaker devices :)
     
  9. SylvainChague

    SylvainChague

    Joined:
    Nov 20, 2012
    Posts:
    8
    For VR, HDRP is hardly usable which leaves the choice between URP or the built in renderer (which seems to be losing Unity's focus).
     
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    version 1.62 uploading right now:

    it will bring better normals to lit decals for URP 10.2.2.+ in case SSAO is enabled.


    normals_reconstructed.PNG
    reconstructed normals (from depth only)

    normals_sampled.PNG
    sampled normals (ssao enabled)
     
    Quique-Martinez likes this.
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    version 1.62 is available.
     
  12. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    226
    Is this hard to add to the foliage shader? upload_2021-1-23_14-35-1.png
     
    FaberVi likes this.
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    should be straight forward.
     
  14. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    226
    Okay Il give it a try, if i get errors I will be back for some help!.

    Edit: Got it , i now need better grass textures
     
    Last edited: Jan 23, 2021
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    fine!
     
  16. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    235
    Getting these 2 errors with 1.62 URP 2021.1b3
    Code (CSharp):
    1. Shader error in 'Lux URP/Transmission': 'InitializeStandardLitSurfaceData': output parameter 'outSurfaceData' not completely initialized at line 517 (on d3d11)
    2.  
    3. Compiling Fragment program
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING UNITY_PASS_META
    5. Disabled keywords: UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30
    6.  
    Code (CSharp):
    1. Shader error in 'Lux URP/Cloth STL': 'InitializeStandardLitSurfaceData': output parameter 'outSurfaceData' not completely initialized at line 539 (on d3d11)
    2.  
    3. Compiling Fragment program
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING UNITY_PASS_META
    5. Disabled keywords: UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30
    6.  
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    that should not happen – but max urp version supported right now is 10.2.2.
     
  18. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    235
    oh ok.. urp 11.0.0 on 2021.1b3 but wasn't using those shaders in anything so will just wait
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    have you imported at least the 10.2.2 preview package?
     
  20. MrPotatoBread

    MrPotatoBread

    Joined:
    Apr 11, 2019
    Posts:
    7
    When using Lux URP Essentials in any 2020 or beyond versions, I get compiling errors for the shaders. This has been going on for a while, and I assumed it'd just get fixed, but now I'm thinking it's an issue with me rather than needing an update. I'm using URP 10.2.2 with LURP Essentials 1.62.0. Everything shown here is in the Failed to Compile list in shaders. Shader Graph ones work just fine for me though. This is an example of one of the errors, but it's the same basically for all shaders listed here.

    [Shader error in 'Lux URP/Human/Hair': 'InitializeStandardLitSurfaceData': output parameter 'outSurfaceData' not completely initialized at line 344 (on metal)]

    Screen Shot 2021-01-25 at 9.46.07 PM.png

    Any idea of what I'm missing? I made sure to delete the Lux URP download folder in /Library/ on my system and then redownloaded. No result.
     
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    you have to import the lux urp essentails 10.2.2.prview package.
     
  22. MrPotatoBread

    MrPotatoBread

    Joined:
    Apr 11, 2019
    Posts:
    7
    Where do I find it? It's not listed for me, even when enabling preview packages.

    Edit: Ohhhh it's actually a listed file within the pack... huh. I never noticed these before. Thanks! :D
     
    Last edited: Jan 26, 2021
    OfficialHermie likes this.
  23. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    :)
     
  24. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
  25. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    no, not at the moment.
     
  26. Lucideus

    Lucideus

    Joined:
    Dec 7, 2015
    Posts:
    25
    @larsbertram1
    Sorry to bother but are there any plans to add an effect that only covers/paints intersected areas? I've been trying to wrap my head around this with not much luck (lack of experience I reckon). I couldn't find anything in the documentation achieving something like this but again - I could be wrong?
     
  27. dowon951

    dowon951

    Joined:
    Jun 24, 2019
    Posts:
    12
    fixed _time change half to float
    thanks
     
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    isn't that like "hidden surfaces" – but drawing back faces instead of front faces?
     
  29. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    thanks for reporting!
     
  30. Lucideus

    Lucideus

    Joined:
    Dec 7, 2015
    Posts:
    25
    I've been experimenting with it but I'm not getting the desired result as in the referenced pictures. What I want it to do is to only "highlight" the surfaces where it intersects but not sure how to achieve that as I end up always seeing the "hidden" parts of the object itself.
     
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    are you drawing back faces only?
     
  32. Lucideus

    Lucideus

    Joined:
    Dec 7, 2015
    Posts:
    25
    Aye, I did. I might be setting something else up wrong though. This is the first time I'm dealing with these sort of things so trying to read up on as much as possible to get a better understanding of it.
     
  33. Lucideus

    Lucideus

    Joined:
    Dec 7, 2015
    Posts:
    25
    Can't seem to find an Edit button so I'll just quote myself.
    Still no luck in figuring this out.

    To be more precise, what I'm trying to do is highlight any intersecting geometry with a Field of View cone. The image is just an example.


    This is the primary issue however. I only want the intersected area to be highlighted so the bottom part there shouldn't be visible. That said, I've had no luck in getting closer to my goal here. I've tried reading up more on it but I'm kind of lost in the dark I think. I did try decals but it seems to only be rendering in a cube rather than paint the area in which the desired mesh is in.


    I only used the "hidden" shader above because it's the closest to the desired result whatsoever. My attempts were miserable at best, haha.

    Any help would be much appreciated.
     
  34. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    711
    Check out this asset and the demo video from 0-20 sec and from 1m where it shows the female face it looks nice:
    https://assetstore.unity.com/packages/vfx/shaders/nodes-for-shader-graph-124611

    I've moved over from HDRP to URP now since it's just better overall and have seen your skin shader in your video however maybe its just the lighting in your demo but the one in the nodes video looks better so I was wondering if you could upgrade the skin shader by integrating the nodes in that package in your UPR Essentials product so we can get that nice skin even if that just means making a shader graph shader from the nodes in that package or would you recommend I just buy the nodes pack and use the skin shader in that pack and not use your skin shader?
     
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    of course i can't.
    but i don't need to do so as the lux skin shader should already be superior :)
    sss is only one piece in the puzzle. and the lux skin shader also implements pre integrated scattering and slit diffuse and specular normals.
     
  36. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    711
    My bad I didn't mean upgrade the skin shader you have now I just meant include an alternative one by using the nodes samples given and generating that same shader graph sample from that asset and putting it in your pack as part of the shader lineup.

    If you are saying your skin looks better than the one in that asset then I am going to assume it comes down to the different lighting conditions as the other pack is in direct sunlight and yours is in a dark room only being lit in a small range.
     
  37. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    i said the shader should be superior. the final result depends on textures, models, lighting.
     
  38. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    711
    Does your system support the URP 2020.2 range?
     
  39. usedtobe

    usedtobe

    Joined:
    Apr 9, 2016
    Posts:
    3
    I'm tryin to get the outline shader to work, but it seems to be sort of "exploding" my mesh!

    upload_2021-1-30_8-28-52.png

    any idea what's going on here? I've tried bring this prefab directly into the outline demo scene and it still behaves strange.
     
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    it supports urp 10.2.2. max
     
  41. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    this is how the shader works :)
    it extrudes the mesh along its normals to create the outline.

    i guess you want to have a smooth pot, right?
    but what you have is a flat shaded pot instead: each edge creates a harsh border -> 2 different normals per vertex -> exploding mesh.

    in case you want a smooth pot you have to fix your normals anyway - just for the lighting to be correct.

    if you want a flat shaded pot smooth the normals anyway. this will make the extrusion work properly. then for lighting use the lux flat shading shader.

    right now unity just doubles your vertex count. using smooth normals and the flat shading shader will massively reduce the vertex count.
     
  42. usedtobe

    usedtobe

    Joined:
    Apr 9, 2016
    Posts:
    3
    ha! well, that makes perfect sense, and works great. thank you very much! I'm still a little confused about the ztest vs stencil comparison, but I will chew on it more before forming a question :)
     
  43. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    Shader error in 'Lux URP/Terrain/Mesh Terrain': 'InitializeStandardLitSurfaceData': output parameter 'outSurfaceData' not completely initialized at line 223 (on d3d11)

    urp last version 10.2.2
    unity 2020.2.2f1

    still getting error

    mb i nee to do something manualy? or
     
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    you have to import the lux urp 10.2.2 preview package
     
  45. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    no
    and this is first i did after i re readed description in asset store page...
    feel a bit dump...
    but its worked =))))
    thx!
     
  46. FaberVi

    FaberVi

    Joined:
    Nov 11, 2014
    Posts:
    145
    There is no vegetation shader to support it at the moment?
     
  47. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    226
    Sent you images in private!.
     
    FaberVi likes this.
  48. Object-Null

    Object-Null

    Joined:
    Feb 13, 2014
    Posts:
    68
    Hello,

    Im using the human skin shader for my characters. but im having a problem. They objects with the skin shader can't cast shadows on other objects. (it is for a mobile game using URP).
    i figured out it has something todo with 'transparent'.
    (because when i add a default Lit shader with transparent enabled is also doesn't cast shadows, when i set it to 'opaque' shader are cast.)

    does somebody hanve any idea how i can cast the shadow from my character?
    thanks
     

    Attached Files:

    Last edited: Feb 4, 2021
  49. lilacsky824

    lilacsky824

    Joined:
    May 19, 2018
    Posts:
    164
    Hi! I found trees on terrain won't scale when I use foliage shader.
    Maybe you can add support to scale and color trees by _TreeInstanceColor and _TreeInstanceScale properties in future release. Like built-in Tree Creator shaders.
    Thank you!:)
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,850
    you must not set the shader to transparent. use opaque instead.