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. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    60
    I've also found this issue tracker saying same problem still happens in beta versions.
    https://issuetracker.unity3d.com/issues/the-depth-prepass-does-not-batch-effectively
    Besides ,perhaps the camera fade keyword should do some distinction from common alpha test since they actually don't use alpha texture(channel) and should be treated the same as common opaque objects in the shadow caster pass. Maybe a decouple should be added? That my suggestion.
    Thank you.
     
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    something i will keep an eye on.
     
  3. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    60
    Furthermore, I recommend a custom render queue option since the queue is now binded with the surface type at present.
    A customizable queue could be better to adapt with the srp batching, as it allows to manually group the materials depending on keywords.
     
    Last edited: Dec 7, 2022
  4. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    60
    There seems to be some problem with the lit extended uber's lightmap baking when alpha clip is enabled.
    It is treated as no clip applied for example a whole quad without the silhouette of the alpha cliping.
     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    that should be fixed with the next update. the gui wasa bit to aggressive.
     
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    the debug view might look different. the bakes ahould be as false as that from the built in lit shader :(

    left: URP Lit, right: Uber.
    both shaders bake emission properly, however baked shadows do not seem to respect any alpha testing at all.

    lmBake.PNG
     
    Last edited: Dec 11, 2022
  7. jacknero

    jacknero

    Joined:
    Aug 15, 2018
    Posts:
    60
    QQ截图20221212182708.png QQ截图20221212182749.png
    The fact is Unity‘s built-in Lit works fine in alpha shadow cast baking,and its editor selection silhouette also works fine.
    The issue may happen in the meta pass.
     
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    last example was from unity 2022.2. this one is from 2021.2.
    red: lit, green: uber, both look fine when it comes to shadows.
    i am working on the 1.9. update but i do not remember if this has fixed it :) i think it works in the current version as well.

    uberLM.PNG
     
  9. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    Unity 2022.2.0f1:
    Get the following error using LuxURPEssentials_URP_12.1 (Version 1.86)
    Shader error in 'Lux URP/Projection/Top Down': undeclared identifier 'GetMeshRenderingLightLayer' at Lighting.hlsl(110) (on d3d11)
     
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    you will have to wait for version 1.9. which will be compatible with urp 14.0.4, sorry.
     
  11. cpberi

    cpberi

    Joined:
    Jul 30, 2012
    Posts:
    12
    Hi~
    Do you have an estimated timeframe for the version 1.9 release?
     
  12. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    maybe this year :)
     
    SniperED007 likes this.
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    version 1.9. has been submitted.
    it adds support for URP 14.0.4. which unfortunately is pretty broken... but if you want to get started with Forward+ and do not need rendering layers you should be good to go.


    ## Version 1.9

    ### Added
    - HLSL Shaders for URP 14 added:
    - - Added support for Forward+
    - - Added support for Rendering Layers
    - - Added support for LOD cross fading
    - - Added support for DOTS instancing on almost all HLSL shaders.
    - - Added simple geometry based billboard shader for tree creator trees.

    - Added simple procedural skybox shader which supports fog.

    - Shader Graph nodes: In shader Tone Mapping added.
    - Shader Graph nodes: Standard lighting added.
    - Shader Graph nodes: GPU instanced Mesh Particles node added.

    ### Fixed
    - Cloth shader: Fixed naming of meta pass.
    - Uber shader GUI: Does not override the custom render queue settings anymore.
    - Billboard shader: Added missing multicompile pragma to the shadow caster pass.
    - Toon Outline shaders: Fixed SRP batcher compatibility.
    - Lux URP Toon & Outline: Fixed missing SSAO properties.
    - Toon Lighting: Fixed occlusion if SSAO is disabled.
    - Lit Decal: Fixed error if orthographic and HQ were enabled

    ### Changed
    - Shader Graph nodes: Skin Lighting node lets you provide custom normals to add e.g support for wrinkle maps.
    - Removed the "Lux URP Grass TextureDisplace" shader from the "Lux SRP Grass Displacement" folder: The default grass shader has an option to apply grass displacement.
     
    lilacsky824 and SniperED007 like this.
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    version 1.9 is available.
    in order to get the URP 14.0.4. shaders you will have to update the package using Unity 2022.2.
     
  15. grllle

    grllle

    Joined:
    May 4, 2015
    Posts:
    28
    First of all, please excuse me if I am asking a question that has already been answered and I missed it in the documentation or thread.

    I would like to validate if we can use the decal system for a 2022.1.17 project (URP 13.1.8). In doing so, I do not understand how to perform a correct downgrade.
    The current version v1.9 generates render errors, so I guessed that I have to use v1.86. When I install the package (LuxURPEssentials_URP_12.1+) on top of the current version, the same render errors occur. Have I misunderstood something fundamental here?

    Another question: Is the asset tested for Xbox (Scarlett, One), as well as PS4 and PS5?

    Thanks in advance!
     
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    nope. i have no dev kits.
    download the package using your current unity version. using 2022.1 you should grab 1.9 for 2022.1.
    what errors do you get?
     
  17. BernhardTheThreak

    BernhardTheThreak

    Joined:
    Dec 1, 2022
    Posts:
    4
    damn it, forgot to post the screenshot. No errors but the rendering of the decals seemed faulty. i reimported the package via the package mgr and now it states the correct urp version and rendering is good.
    Thanks for the help and sorry for the fuzz!

    I will test the package on the dev kits and give feedback!
     
  18. Reign_of_Light

    Reign_of_Light

    Joined:
    Oct 15, 2014
    Posts:
    46
    First of all, thank you, all in all I love the Lux URP Essentials package :) .

    However, like Qleenie a few messages earlier, I also would like a Shader Graph version of the hair shader, because I need to add emission to it. Is there a specific reason there is no Shader Graph variant for hair shaders, like a specific feature that doesn't work well with Shader Graph?
    That said, what shader of yours would you say is closest to the hair shaders but has a Shader Graph implementation? Or would there be another way of adding emission to the Hair shaders?
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it is just a lot of work and wiring all the inputs in shader graph doesn't make any fun... actually hair always has been just hair for me and i did not really see the need to do many customizations here: emissive hair might not be a common se case :)
    i will be working on a shader graph version. meanwhile you can check ggx aniso lighting which at least allows anisotropic reflections.
     
    Reign_of_Light likes this.
  20. Danibi

    Danibi

    Joined:
    Nov 10, 2012
    Posts:
    36
    Hi,

    We have a 2D Mecanim Skeleton Mesh. Screenshot attached.
    The mesh doesn't precisely follow the outline, we need an outline for URP that takes alpha into account.
    Does the outline of lux-urp-essentials work with the alpha?

    Thanks.
     

    Attached Files:

  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    version 1.91 is available:

    ### Fixed
    - GGX/Cloth/Hair: Fixed reflections

    ### Added
    - Shader Graph: Hair lighting sub graph added.
    - Grass Shader: Only needed for URP 12.1 - "No Light Layers (URP 12 only)" added as grass placed using the terrain engine will not receive any lighting if Light Layers are enabled.
     
    Reign_of_Light likes this.
  22. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    there is an outline shader which takes alpha into account - somehow. but 2D is not supported.
     
  23. Reign_of_Light

    Reign_of_Light

    Joined:
    Oct 15, 2014
    Posts:
    46
    Wow, amazing :) ! That was fast! Thank you so much!
     
  24. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    leave a review on the asset store :)
     
  25. Reign_of_Light

    Reign_of_Light

    Joined:
    Oct 15, 2014
    Posts:
    46
    Good idea :) ! Just did!
     
  26. John_Leorid

    John_Leorid

    Joined:
    Nov 5, 2012
    Posts:
    651
    "Shader 'Lux URP/Particles/Simple Lit': fallback shader 'Lightweight Render Pipeline/Particles/Unlit' not found"
    and
    "Shader error in 'Lux URP/Versatile Blend': 'LuxFragmentBlendPBR': cannot implicitly convert from 'half3' to 'struct SurfaceData' at line 339 (on d3d11)"

    Just to let you know.
     
    Last edited: Jan 6, 2023
  27. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    which version?
     
  28. John_Leorid

    John_Leorid

    Joined:
    Nov 5, 2012
    Posts:
    651
    Package Manager says "1.91", I upgraded it this week.
     
  29. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    thanks!
     
  30. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    256
    does this asset support tessellation / displacement?
     
  31. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    nope. there is a particle shader using tessellation (deprecated with urp 14+) but urp does not really support tessellation like it should (like missing shadow clipping planes).
     
    Liminal-Ridges likes this.
  32. bvonline

    bvonline

    Joined:
    Feb 27, 2021
    Posts:
    85
    Got this warning. What does it mean? Just a hint: i am using atmospheric Height Fog from Boxotrophic, and working with Unity2020.3.43f1 (URP).

    Shader warning in 'Lux URP/Projection/Top Down': 'lerp': implicit truncation of vector type at line 272 (on d3d11)
    Compiling Fragment program with FOG_EXP2 _COMBINEDTEXTURE _DYNSCALE _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _NORMALMAP _SHADOWS_SOFT _TOPDOWNPROJECTION
    Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    Disabled keywords: DIRLIGHTMAP_COMBINED FOG_EXP FOG_LINEAR INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING LOD_FADE_CROSSFADE SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHT_SHADOWS _ENVIRONMENTREFLECTIONS_OFF _MASKFROMNORMAL _RECEIVE_SHADOWS_OFF _SCREEN_SPACE_OCCLUSION _SIMPLEFUZZ _SPECULARHIGHLIGHTS_OFF​

    Thank you for your help.
     
  33. pabloruiz55

    pabloruiz55

    Joined:
    Aug 13, 2012
    Posts:
    8
    Hi, I'm having an issue with the shaders when building the project. Using the Uber Lit shader with Rim effect on. On Unity, when playing the game it shows fine, but when playing the build game the rim effect doesn´t show. Am I missing some config setting?

    Using Unity 2021.3 LTS, Lux Essentials 1.91, URP 12.1.8. Building for Windows.
    Thanks.
     
  34. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it is just a warning and should work fine.
     
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    looks like a variant stripping issue. look at your shader stripping settings and consider creating your own shader variant collection.
     
  36. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    Hi i m a newbie in shader, so could you please help me understand the billboard implement in lux shader?
    float2 percent = input.texcoord.xy;
    float3 billboardPos = (percent.x - 0.5f) * _Shrink * billboardTangentWS;
    why use uv here?
     
  37. RaiuLyn

    RaiuLyn

    Joined:
    Sep 14, 2014
    Posts:
    39
    Hi, I got Shader errors when I upgraded from Unity 2021.3.2f1 to Unity 2021.3.16f1. URP 12.1.8 with Lux URP Essentials 1.91.


    Shader error in 'Lux URP/Particles/Simple Lit': undeclared identifier '_AdditionalLightsWorldToShadow' at Pass.hlsl(176) (on d3d11)

    Compiling Subshader: 0, Pass: ForwardLit, Vertex program with _ADDITIONALLIGHT_SHADOWS _ADDITIONAL_LIGHTS _FLIPBOOKBLENDING_ON _MAIN_LIGHT_SHADOWS _NORMALMAP _PERVERTEX_SAMPLEOFFSET _PERVERTEX_SHADOWS _SOFTPARTICLES_ON _SPECULARHIGHLIGHTS_OFF
    Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    Disabled keywords: FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS_VERTEX _ADDITIVE _ALPHAMODULATE_ON _ALPHAPREMULTIPLY_ON _CLUSTERED_RENDERING _COLORADDSUBDIFF_ON _COLORCOLOR_ON _COLOROVERLAY_ON _DISTORTION_ON _FADING_ON _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _RECEIVE_SHADOWS_OFF _SPECGLOSSMAP _SPECULAR_COLOR
    Shader error in 'Lux URP/Particles/Simple Lit Tess': undeclared identifier '_AdditionalLightsWorldToShadow' at Pass.hlsl(176) (on d3d11)

    Compiling Subshader: 0, Pass: ForwardLit, Vertex program with _ADDITIONALLIGHT_SHADOWS _ADDITIONAL_LIGHTS _FLIPBOOKBLENDING_ON _MAIN_LIGHT_SHADOWS _NORMALMAP _PERVERTEX_SAMPLEOFFSET _PERVERTEX_SHADOWS _SPECULARHIGHLIGHTS_OFF
    Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    Disabled keywords: FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS_VERTEX _ADDITIVE _ALPHAMODULATE_ON _ALPHAPREMULTIPLY_ON _CLUSTERED_RENDERING _COLORADDSUBDIFF_ON _COLORCOLOR_ON _COLOROVERLAY_ON _DISTORTION_ON _FADING_ON _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _RECEIVE_SHADOWS_OFF _SOFTPARTICLES_ON _SPECGLOSSMAP _SPECULAR_COLOR​
     
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i updated my 2021 version to 2021.3.16f1 which uses URP 12.1.8. and bam!
    12.1.7. works fine but 12.1.8. needs you to edit the shaders.
    find:
    #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
    and get rid of the per fragment stuff:
    #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS
     
  39. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    vertices a shriked down to a point and then get expanded in viewspace according to the uvs.
     
  40. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    I updated my project from URP 7.7.1 to 14.0.4. I deleted all Lux URP folders, then reimported Lux URP 1.91 from scratch using Unity 2022.2.2's package manager. Then I imported the URP 12 package as well. I'm still getting errors like the following from lots of Lux shaders:

    Shader error in 'Lux URP/Lit Extended Uber': undeclared identifier 'GetMeshRenderingLightLayer' at Lighting.hlsl(90) (on d3d11)

    I'm also getting errors like:

    undeclared identifier '_AdditionalLightsWorldToShadow'

    I did the search/replace suggestion you made earlier but still get the errors.
     
  41. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    that was the mistake. if you get latest with 2022.2. you get the right shaders right on import.
    importing the 12.1. package will downgrade the shaders from 14.04. to 12.1 and break them.
     
  42. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Thank you. That seems to have resolved the GetMeshREnderingLightLayer error, but I still get the '_AdditionalLightsWorldToShadow error. I tried the search/replace you suggested above but it did not change the error. I get the error from the following shaders:

    Lux URP/Particles/Simple Lit
    Lux URP/Particles/Simple Lit Tess
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    if you scroll up the page a few posts you will find the solution.
     
  44. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    As I said, I already tried that. Specifically, I searched and replaced all occurrences of:

    #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS

    and replaced them with:

    #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS

    Is that correct? If so, it did not solve the error.
     
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    hmm. 1.91 for 14.0.4 should be fine without any tweaks.
     
  46. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Hmmm... I'm definitely on 1.91, 14.04, and 2022.2.2. I've deleted everything and reimported several times to make sure it is clean, and I'm still getting these two errors:

    Code (CSharp):
    1. Shader error in 'Lux URP/Particles/Simple Lit Tess': undeclared identifier '_AdditionalLightsWorldToShadow' at Pass.hlsl(169) (on d3d11)
    2.  
    3. Compiling Subshader: 0, Pass: ForwardLit, Fragment program with _SPECULARHIGHLIGHTS_OFF
    4. Platform defines: SHADER_API_MOBILE UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2
    5. Disabled keywords: FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_FULL_STANDARD_SHADER UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _ADDITIONALLIGHT_SHADOWS _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHT_SHADOWS _ADDITIVE _ALPHAMODULATE_ON _ALPHAPREMULTIPLY_ON _ALPHATEST_ON _COLORADDSUBDIFF_ON _COLORCOLOR_ON _COLOROVERLAY_ON _DISTORTION_ON _EMISSION _FADING_ON _FLIPBOOKBLENDING_ON _FORWARD_PLUS _LIGHT_COOKIES _LIGHT_LAYERS _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _NORMALMAP _PERVERTEX_SAMPLEOFFSET _PERVERTEX_SHADOWS _RECEIVE_SHADOWS_OFF _SHADOWS_SOFT _SOFTPARTICLES_ON _SPECGLOSSMAP _SPECULAR_COLOR _TRANSMISSION
    6.  
    and

    Code (CSharp):
    1. Shader error in 'Lux URP/Particles/Simple Lit': undeclared identifier '_AdditionalLightsWorldToShadow' at Pass.hlsl(169) (on d3d11)
    2.  
    3. Compiling Subshader: 0, Pass: ForwardLit, Fragment program with _SPECULARHIGHLIGHTS_OFF
    4. Platform defines: SHADER_API_MOBILE UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2
    5. Disabled keywords: FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_FULL_STANDARD_SHADER UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _ADDITIONALLIGHT_SHADOWS _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHT_SHADOWS _ADDITIVE _ALPHAMODULATE_ON _ALPHAPREMULTIPLY_ON _ALPHATEST_ON _COLORADDSUBDIFF_ON _COLORCOLOR_ON _COLOROVERLAY_ON _DISTORTION_ON _EMISSION _FADING_ON _FLIPBOOKBLENDING_ON _FORWARD_PLUS _LIGHT_COOKIES _LIGHT_LAYERS _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _NORMALMAP _PERVERTEX_SAMPLEOFFSET _PERVERTEX_SHADOWS _RECEIVE_SHADOWS_OFF _SHADOWS_SOFT _SOFTPARTICLES_ON _SPECGLOSSMAP _SPECULAR_COLOR _TRANSMISSION
    6.  
     
  47. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    you disabled _ADDITIONAL_LIGHT_SHADOWS - then there is hardly any need for these shaders.
    nevertheless: i tested disabling "Additional Lights -> Cast Shadows" in the pipeline settings and it all still works fine here.
     
  48. CreateU

    CreateU

    Joined:
    Aug 18, 2017
    Posts:
    3
    Hi, I'm used Unity 2021.3.16f1, URP 12.1.8 with Lux URP Essentials 1.91.
    I searched and replaced all occurrences of:

    #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
    and replaced them with:
    #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS

    But getting the following error.

    Code (CSharp):
    1. Shader error in 'Lux URP/Particles/Simple Lit': undeclared identifier '_AdditionalLightsWorldToShadow' at Pass.hlsl(176) (on d3d11)
    2.  
    3. Compiling Subshader: 0, Pass: ForwardLit, Vertex program with _SPECULARHIGHLIGHTS_OFF
    4. Platform defines: SHADER_API_MOBILE UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2
    5. Disabled keywords: FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _ADDITIONALLIGHT_SHADOWS _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHT_SHADOWS _ADDITIVE _ALPHAMODULATE_ON _ALPHAPREMULTIPLY_ON _CLUSTERED_RENDERING _COLORADDSUBDIFF_ON _COLORCOLOR_ON _COLOROVERLAY_ON _DISTORTION_ON _FADING_ON _FLIPBOOKBLENDING_ON _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _NORMALMAP _PERVERTEX_SAMPLEOFFSET _PERVERTEX_SHADOWS _RECEIVE_SHADOWS_OFF _SOFTPARTICLES_ON _SPECGLOSSMAP _SPECULAR_COLOR
    6.  
    And

    Code (CSharp):
    1. Shader error in 'Lux URP/Particles/Simple Lit Tess': undeclared identifier '_AdditionalLightsWorldToShadow' at Pass.hlsl(176) (on d3d11)
    2.  
    3. Compiling Subshader: 0, Pass: ForwardLit, Vertex program with _SPECULARHIGHLIGHTS_OFF
    4. Platform defines: SHADER_API_MOBILE UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2
    5. Disabled keywords: FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _ADDITIONALLIGHT_SHADOWS _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHT_SHADOWS _ADDITIVE _ALPHAMODULATE_ON _ALPHAPREMULTIPLY_ON _CLUSTERED_RENDERING _COLORADDSUBDIFF_ON _COLORCOLOR_ON _COLOROVERLAY_ON _DISTORTION_ON _FADING_ON _FLIPBOOKBLENDING_ON _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _NORMALMAP _PERVERTEX_SAMPLEOFFSET _PERVERTEX_SHADOWS _RECEIVE_SHADOWS_OFF _SOFTPARTICLES_ON _SPECGLOSSMAP _SPECULAR_COLOR
     
  49. CreateU

    CreateU

    Joined:
    Aug 18, 2017
    Posts:
    3
    Added : Removed two files to force build. ('Lux URP/Particles/Simple Lit', 'Lux URP/Particles/Simple Lit Tess'

    But build result is fail.

    Code (CSharp):
    1. Shader error in 'Lux URP/Lit Extended Uber': invalid subscript 'tangentWS' at Pass.hlsl(66) (on d3d11)
    2.  
    3. Compiling Subshader: 0, Pass: DepthOnly, Fragment program with _ALPHATEST_ON
    4. Platform defines: SHADER_API_MOBILE UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2
    5. Disabled keywords: INSTANCING_ON LOD_FADE_CROSSFADE SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_FULL_STANDARD_SHADER UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _FADING_ON _PARALLAX _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
    Code (CSharp):
    1. Shader error in 'Lux URP/Lit Extended Uber': invalid subscript 'tangentWS' at Pass.hlsl(66) (on gles3)
    2.  
    3. Compiling Subshader: 1, Pass: DepthOnly, Vertex program with STEREO_MULTIVIEW_ON _ALPHATEST_ON
    4. Platform defines: SHADER_API_GLES30 SHADER_API_MOBILE UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_DLDR_ENCODING UNITY_NO_CUBEMAP_ARRAY UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3
    5. Disabled keywords: INSTANCING_ON LOD_FADE_CROSSFADE UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_PBS_USE_BRDF1 UNITY_PBS_USE_BRDF2 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_VIRTUAL_TEXTURING _PARALLAX
    6.  
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    strange, i do not get these errors in my original projects but creating a new one...

    Fixing Lux URP/Particles/
    - open "Lux URP Particles Simple Lit Forward Pass.hlsl"
    - find: "half LuxAdditionalLightRealtimeShadow(){} and wrap it with "#if defined(_PERVERTEX_SHADOWS)" so it looks like this:

    Code (CSharp):
    1. #if defined(_PERVERTEX_SHADOWS)
    2.     half LuxAdditionalLightRealtimeShadow(int lightIndex, float3 positionWS, ShadowSamplingData shadowSamplingData)
    3.     {
    4.         #if !defined(ADDITIONAL_LIGHT_CALCULATE_SHADOWS)
    5.             return 1.0h;
    6.         #endif
    7.      
    8.         ...
    9.  
    10.         return LuxSampleShadowmap(TEXTURE2D_ARGS(_AdditionalLightsShadowmapTexture, sampler_AdditionalLightsShadowmapTexture), shadowCoord, shadowSamplingData, shadowParams, true);
    11.     }
    12. #endif
     
    Brady likes this.