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

    digieraGames

    Joined:
    Feb 24, 2020
    Posts:
    2
    unity version used 2019.2.01f.
    lwrp 6.9.1
    billboard shader working in editor but not on android built
     
  2. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    386
    Hi!, Just wondering if these shaders have been tested on entities running via URP, DOTS and the Hybrid Renderer V.2? I'm specifically interested in the Transmission shaders
     
  3. EyasSH

    EyasSH

    Joined:
    Aug 15, 2020
    Posts:
    15
    @larsbertram1 One thing that would be cool if the Terrain Lit shader's procedural texturing supported using world-space UVs.

    I'd love to tile my terrain into smaller pieces and have adjacent terrains with the same texture layer painted on the seam, without having an obvious seam.
     
  4. tehusterr

    tehusterr

    Joined:
    Sep 27, 2019
    Posts:
    7
    Hi! I will say it again, loving the shaders. However is it possible to add some shadergraphvertex magic to one of your shaders. For example i want to add some vertex magic to the cloth shader?
    I'm not yet very comfortable with programming shaders without the shadergraph. Can the cloth shader be converted to shadergraph so i can add stuff or is there any other solution?
     
  5. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    668
    Hello,

    Just wanted to say I keep getting this message. I am sure you will take care of this in a future update but just wanted to let you know in case you hadn't seen this.

    Assets\Thirdparty_Assets\Lux URP Essentials\Lux SRP Grass Displacement\Scripts\GrassDisplacementRenderFeature.cs(124,24): warning CS0618: 'ProfilingSample' is obsolete: 'Please use ProfilingScope'


    Thanks!
     
  6. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    227
    Hello.
    Im trying to make a customization for my game. How would i do to make a makeup customization using masks with the Lux URP shaders?
     
  7. GCatz

    GCatz

    Joined:
    Jul 31, 2012
    Posts:
    282
    hey, just an idea for future update to add an option to decals to use some kind of atlasing :)
     
    Last edited: Dec 12, 2020
  8. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    as Lux URP Essentials support the SRP Batcher there is no atlas option :) see here for further details.
     
    GCatz likes this.
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    Version 1.5 is on its way.

    ### Added:
    - Decals: HQ sampling added to avoid artifacts at depth discontinuities.
    - Skin: Ambient back scattering added.
    - URP 10.2. preview package added which supports SSAO and Shadowmasks.

    hqdisabled.PNG
    HQ Sampling disabled: 2x2px artifacts around edges in the depth buffer.

    hqenabled.PNG
    HQ Sampling enabled: 2x2px artifacts are gone.
     
  12. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    @larsbertram1 you could add a version.txt file to your asset like other assets do, this way we know which version we have installed.
    What did you change to the hlsl shaders? the upgrader failed miserably on some hlsl and since I have custom graphs of my own I was wondering what's break it so I can fix it and the console gives no hint.
     
    FlightOfOne likes this.
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    for the 10.2 preview? a lot: extended structs, replaced function calls, changed pragmas... more or less it was a complete diff compare.
     
  14. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    oh wow so urp 10 is a completely new beast
     
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    Version 1.5 is available.
     
    FlightOfOne likes this.
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    na, not completely new, but a lot of changes had to made. just take a look as it is available now :)
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    you can just choose the tiling wisely, can't you?
     
  18. Hexalted

    Hexalted

    Joined:
    Nov 16, 2017
    Posts:
    23
    Hi, I get 2 shader errors in Editor after updating to Lux 1.5 and URP 7.5.2.
    I think I updated from Lux 1.45 and URP 7.4.1 that worked well.

    I only use the Fast Outline shaders.

    Errors print for are all platforms I have installed: Windows and WebGL

    Shader error in 'Lux URP/Lit Extended': undeclared identifier '_Surface' at /Code/Unity/.../Library/PackageCache/com.unity.render-pipelines.universal@7.5.2/Shaders/LitForwardPass.hlsl(141) (on d3d11)

    Shader error in 'Lux URP/Lit Extended': 'OutputAlpha': no matching 2 parameter function at /Code/Unity/.../Library/PackageCache/com.unity.render-pipelines.universal@7.5.2/Shaders/LitForwardPass.hlsl(141) (on d3d11)

    Compiling Vertex program with _ADDITIONAL_LIGHTS _MIXED_LIGHTING_SUBTRACTIVE _RECEIVE_SHADOWS_OFF
    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_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING




    upload_2020-12-14_16-11-34.png
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    hmm, works well for me here. "_Surface" sounds like an URP 10 thing. afaik it is not used in shader code in URP < 10.
     
  20. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    with the 1.5 version, still some pink in urp 8.31
    upload_2020-12-14_15-50-16.png
    upload_2020-12-14_15-50-27.png
     
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    @laurentlavigne i haven't looked into urp 8.31. only 7.41 or 10.2 are supported. 8.x and 9.x are just wasted time.
     
  22. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    191
    @larsbertram1 Is your package suitable for use on mobile? Specifically, I am interested in using your skin shader to add some realism to my characters.
     
  23. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    that should be fully ok. especially the skin shader lets you fade skin shading over distance so you can swap back to regular pbr shading at lower lods. minimum urp i recommend is 7.4.
     
  24. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    explain
     
  25. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    not stable, intermediate releases - whatever you wish. look up the corresponding forum threads.
    as far as i know neither 8 nor 9 brought significant changes. so i dropped them.
     
  26. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    i am having weird glitches with v8.2, 8.3 not so much. v10 is stable?
     
  27. moslemcg2

    moslemcg2

    Joined:
    Jul 23, 2017
    Posts:
    4
    Hi,
    Is it possible to use a direction map in hair shader?

    Currently, I see two options for my project (it's not a game, FPS is not important in my case):
    Solution A: built-in pipeline + Lux Plus – Physically Based Shader Framework
    Solution B: URP + lux urp essentials

    Problems:
    Solution A:

    1.hair shader works in the metallic workflow, I mean there are no spec map/color parameters. (it's the main problem)
    2.It's not supporting alpha blending as I know and on another hand, dithered opacity has no randomness so it always makes dithered dots in the same position during the frames. (fixed camera position)
    it would be highly better if there was some randomness in the dithered points/dots position so when we using TAA, this randomness will make a nice and cleaner opacity illusion.

    Solution B:
    It does not support direction map (tangent map)

    So, What's your suggestion?
    (I also should mention that I know nothing about writing the shaders :) so if this request has a cost, I will gladly pay for it because this is the only problem I have in my project and I can't find any solution for it)
     
    Last edited: Dec 18, 2020
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    if built in or urp should be the first question here. or hdrp which has its own hair shader built in.
    the anything else can be negotiated.
     
  29. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    well, it is the future.
     
  30. moslemcg2

    moslemcg2

    Joined:
    Jul 23, 2017
    Posts:
    4
    Thanks for your quick response :)
    HDRP is not in my options, because I found some problems in other parts of my project with HDRP.
    The best solution for me is the built-in pipeline and having a shader that works with the built-in pipeline. if it's not possible so I have no choice but to switch to URP.
    I understand that what I'm asking for may not be useful for others. but It's a huge problem in my project, I tested all possible solutions all over the net and get nothing. :(
    the only one shader that works perfectly is the HDRP hair shader, but I have some other problems with HDRP and can't switch to HDRP.
    Is it possible to have a spec workflow instead of metallic for the Lux "built-in" hair shader?
    Thanks a lot :)
     
    Last edited: Dec 17, 2020
  31. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    ok you meant stable as in not changing all the time, I understood it as unreliable performance or crashy
     
  32. timbokoppers

    timbokoppers

    Joined:
    Nov 14, 2016
    Posts:
    71
    Hi @larsbertram1 , I'm using the latest Lux (1.5) with Unity 2020.2.0f, URP 10.2.2 (verified) and I've got these errors :

    Screenshot 2020-12-17 at 12.47.28.png

    Are you aware of this issue ?
     
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    no, as my dev project uses upr 10.2. (without the additional .2).
    but i updated to 10.2.2. and get no errors... so it looks as if you haven't updated the shaders properly? did you import the urp10 preview package?
     
  34. osss

    osss

    Joined:
    Jan 20, 2014
    Posts:
    27
    Unity2020.2f1+URP 10.2.2 + LuxURPEssentials_URP_10.2.Preview.unitypackage no errors
     
    Last edited: Dec 18, 2020
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    thanks for your feedback!
     
  36. timbokoppers

    timbokoppers

    Joined:
    Nov 14, 2016
    Posts:
    71
    I will try to import the preview package instead.. I've used the 10.2.2, which is the verified version for Unity 2020.2.0f. Thanks for the tip!
     
  37. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    @larsbertram1 btw, how can I modify your transmission shader to use metallic setup also?. Since it uses specular only and most of textures come now days with metallness workflow
     
  38. Luis_Fernandes

    Luis_Fernandes

    Joined:
    Aug 10, 2019
    Posts:
    9
    Hello i am trying to use Billboard Shader but i getting lots of errors in the console, i am using 2020.02 version, is this some incompatibility with the version?

    Note that the shader is working and the images are displayed.
    Although there a a few demo scenes with pink material rendered.

    If so is there a workaround?

    Thanks!

    Code (CSharp):
    1. Maximum number (256) of shader global keywords exceeded, keyword EFFECT_BUMP will be ignored.
    2. You will have to delete some shaders or make them use less keywords.
    3. Keywords used in project now: _SHADOWS_SOFT _AUDIOAMPLITUDEENABLED_ON _MIXED_LIGHTING_SUBTRACTIVE _LINEAR_TO_SRGB_CONVERSION SPOT _SIMPLELIT _DIRECTIONAL VERTEXLIGHT_ON _DIRECTION_Y CAP_SQUARE LIGHTPROBE_SH _GBUFFER_NORMALS_OCT _EMISSION_COLOR _BENDINGMODE_BLUE USE_CUTOUT USE_MAINTEX TONEMAPPING_NEUTRAL FXAA_LOW _SUNDISK_HIGH_QUALITY BASE_QALITY_DILATE USE_SHAPE_LIGHT_TYPE_0 HIGH_QUALITY_DILATE USE_NOISE_DISTORTION GLOW_ON _XYUV_ON _ALPHAMODULATE_ON _CAMERAFADEENABLED_ON _AUDIOSPECTRUMENABLED2_ON DOTS_INSTANCING_ON _EMISSION GAUSSIAN9X9 _DIRECTION_Z _FLIPEMISSIONMASK_ON _COLOROVERLAY_ON BILLBOARD_FACE_CAMERA_POS _SHADOWS_PERVERTEX KRIPTO_FX_HDRP_RENDERING _FLIPBOOK_BLENDING CHROMATIC_ABERRATION _SOFTPARTICLES_ON _SAMPLE_FULL3D _TINTMAP FresnelFade_OFF _MASKDEPTHFADEENABLED_ON _LIT _SUNDISK_SIMPLE APPLY_FORWARD_FOG UNITY_UI_CLIP_RECT USE_VERTEX_LIGHT LOD_FADE_PERCENTAGE _DEPTH_MSAA_4 CORNER_RADIUS XR_OCCLUSION_MESH_COMBINED COLOR_GRADING_HDR FXAA DIRECTIONAL_COOKIE SOURCE_GBUFFER SHADOWS_SHADOWMASK _USE_DRAW_PROCEDURAL GRAIN _AUDIOAMPLITUDEENABLED1_ON _SPECULAR_COLOR _FLIPBOOKBLENDING_ON _AUDIOSPECTRUMENABLED3_ON LIGHTMAP_ON _SAMPLE_GI GAUSSIAN5X5 _ALPHATEST_ON INSTANCING_ON COLOR_GRADING_LDR_2D INNER_RADIUS _CLEAR_STENCIL_PARTIAL TONEMAPPING_ACES _MASKAPPEARNOISETRIPLANAR_ON BLOOM DIRLIGHTMAP_COMBINED _VISUALIZEMASKDEBUG_ON _FLIPOFFSETMASK_ON UNITY_SINGLE_PASS_STEREO STEREO_INSTANCING_ON SHADOWS_SOFT _AUDIOMASKENABLED2_ON EPO_HDRP _ADDITIVE _RECEIVE_SHADOWS_OFF _CLEARCOATMAP _INVERTDIRECTION_ON _VISUALIZE_COMBINED_WIND _EDGESONLYMODEENABLED_ON BORDERED _CLOSEFADEENABLED_ON USE_FRESNEL_FADING IS_JOIN_MESH SHADOWS_SINGLE_CASCADE USE_SHAPE_LIGHT_TYPE_3 USE_SCRIPT_FRAMEBLENDING CHROMATIC_ABERRATION_LOW SECTOR _COATMASK FXAA_KEEP_ALPHA VIGNETTE AUTO_EXPOSURE _ENABLEDITHERING _AUDIOAMPLITUDEENABLED3_ON _AUDIOMASKENABLED_ON INFO_BUFFER_STAGE _OCCLUSIONMAP _NOISEDISTORTIONENABLED_ON _LOCALNOISEPOSITION_ON _DISTORTION_ON UNDERLAY_ON SHADOWS_CUBE FOG_EXP _WIREFRAMEENABLED_ON _COLORCOLOR_ON _MASKAFFECTSTRANSPARENCY_ON USE_FRESNEL Clip_OFF _PERVERTEX _SHADOWS_PERPIXEL VertLight_OFF _GLOSSINESS_FROM_BASE_ALPHA _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A FOG_LINEAR SHADOWS_SCREEN FrameBlend_OFF PROCEDURAL_INSTANCING_ON _PARALLAXMAP _LOCKYOFFSET_ON LIGHTMAP_SHADOW_MIXING _DIRECTION_X _ZYUV_ON _MASKAPPEARUSEWORLDPOSITION_ON _RAMPOFPROCEDRUAL_ON USE_TEXTURE ETC1_EXTERNAL_ALPHA _METALLIC_SETUP _NORMALMAP _SPECULARHIGHLIGHTS_OFF SHADOWS_SPLIT_SPHERES _ENVIRONMENTREFLECTIONS_OFF _FLIPMORPHMASK_ON ANISOTROPIC_BLUR _FOG _AUDIOAMPLITUDEENABLED2_ON UNITY_UI_ALPHACLIP BASE_QUALITY_DILATE _APPLYFOG_ON JOIN_BEVEL _ADDITIONAL_OFF _CENTERMASKENABLED_ON _AUDIOSPECTRUMENABLED_ON TEXARRAY_CUTOUT OUTLINE_ON _RAMPORPROCEDRUAL_ON USE_HEIGHT STEREO_MULTIVIEW_ON UNITY_HDR_ON _SPECGLOSSMAP _AUDIOENABLED_ON FINALPASS _DEFERRED_ADDITIONAL_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE ULTRA_QUALITY_DILATE GAUSSIAN13X13 DIRECTIONAL _MASKAPPEARINVERT_ON _METALLICGLOSSMAP POINT _BLENDMODE_ADD SoftParticles_OFF USE_SHAPE_LIGHT_TYPE_2 _COLORADDSUBDIFF_ON _USEPIXELDISTANCE_ON _ALPHABLEND_ON _POM _ZWRITEMODE_ON COLOR_GRADING_HDR_3D _GLOSSYREFLECTIONS_OFF STEREO_CUBEMAP_RENDER_ON USE_ALPHA_CLIPING _MASKSOFTBORDERS_ON STEREO_DOUBLEWIDE_TARGET _RAMPENABLED_ON _FINALOPACITYDITHERENABLED_ON _WIND_TEXTURE BEVEL_ON POINT_COOKIE _KEYWORD0_ON _FADING_ON USE_SOFT_PARTICLES BlendAdd _ALPHAPREMULTIPLY_ON FORCE_LINEAR FrameBlend_ON _UVSEC_UV1 _DEPTH_MSAA_2 JOIN_ROUND USE_REFRACTIVE _METALLICSMOOTHNESSRANDOMOFFSET_ON _APPLYFOG EDITOR_VISUALIZATION _DEPTH_NO_MSAA TONEMAPPING_CUSTOM _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _SAMPLENORMAL SHADOWS_DEPTH _USEGAMMARENDERING_ON FOG_EXP2 _OFFSETYLOCK_ON _CLEARCOAT _METALLICSPECGLOSSMAP _RAMPFLIP_ON _CUBEMAPREFLECTIONENABLED_ON _VERTEXDISTORTIONENABLED_ON _SINGLELAYERCOLORINGENABLED_ON _ADDITIONAL_LIGHTS LOD_FADE_CROSSFADE _IGNOREYAXIS_ON _DEPTH_MSAA_8 USE_BLENDING _MAIN_LIGHT_SHADOWS _ADDITIONAL_LIGHT_SHADOWS KRIPTO_FX_LWRP_RENDERING USE_WEIGHTED_AVERAGE JOIN_MITER PIXELSNAP_ON COLOR_GRADING_HDR_2D SOFTPARTICLES_ON DISTORT _ADJUSTSPEC DIRLIGHTMAP_SEPARATE _DETAIL_SINGLE BOX_BLUR BLOOM_LOW _AUDIOSPECTRUMENABLED1_ON DYNAMICLIGHTMAP_ON USE_SHAPE_LIGHT_TYPE_1 _NOISE02ENABLED_ON _SPOT _AUDIOMASKENABLED3_ON _DEFERRED_SUBTRACTIVE_LIGHTING _SCREEN_SPACE_OCCLUSION _SUNDISK_NONE _SPECULAR_SETUP _AUDIOMASKENABLED1_ON _BLENDMODE_BLEND _DETAIL_MULX2 _POINT _FLIPBOOKBLENDING_OFF CAP_ROUND UNITY_PASS_SHADOWCASTER STEREO_INSTANCING_ENABLED UNDERLAY_INNER USE_INFO_BUFFER _ADDITIONAL_LIGHTS_VERTEX
    4. UnityEditor.EditorApplication:Internal_CallGlobalEventHandler ()
     
  39. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    transmissive materials hardly ever are metals... so going with metalness here just wastes some control over the material (although the shader does not support a specular map but just a single color value).
    but of course you can hack the shader:
    • comment "#define _SPECULAR_SETUP 1".
    • inside the "InitializeSurfaceData" function you would have to sample your metal mask and then set outSurfaceData.metallic accordingly.
    • the lighting function then should take care about the conversion from metallic to specular when it sets up the BRDF data.
     
    MP-ul likes this.
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    the code from the console you have posted does not show any error in the shaders.
    it just tells you that there are too many keywords used by the shaders in your project.
    so most likely you have installed a bunch of assets with custom shaders which request keywords.
    so try to get rifd of these or istall lux urp essentials in a fresh project.

    if there are pink materials this might be caused either:
    • by the keyword issue (which i doubt)
    • by the fact that you did not install the urp10preview package (which i guess) 2020 uses urp 10 and needs the preview package.
     
  41. Luis_Fernandes

    Luis_Fernandes

    Joined:
    Aug 10, 2019
    Posts:
    9
    You are right, i have a few other packages installed on the project.
    Too much shaders then.

    For the preview i installed it and everything is working now :)

    And i have tried a few Lux shaders in a few scenes and they are working as expected!
    Awesome job!

    Thanks for the quick reply.
     
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    i would go over the packages and look what you really need.
    then look if the corresponding shaders use global shader keywords. most shader should get away with local keywords which do not count.
    also make sure that you do NOT HAVE A SINGLE standard rp shader in your project as it will need an incredible amount of keywords like fog, forward rendering or instancing.
    some packages come with shaders for built in, urp and hdrp. make sure you delete built in and hdrp shaders.
    even if you use e.g. unity's terrain tools: these will add old school shaders and cost you a bunch of keywords.
    great!
    you are welcome
     
  43. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    230
    Wow It works, Thanks!. One more question the upload_2020-12-19_15-29-26.png mask(R) what is it supposed to do, obscure the Transmision effect or something else?.
     
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    mask r lets you switch between regaular and translucent lighting. have a look at the demo: on of the candles there mixes both lightings within a single material = 1 draw call and no additional set pass call :)
     
  45. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    I think there's a slight bug in the skin lightning normal calculation.

    If you have "Enable Normal Map" on but "Enable Diffuse Normal Sample" off, the normals are completely flat, ie not using the normal map.
    In "Lux_Lighting_Skin.hlsl" in function Lighting_half, it looks like the logic is with enable normal map on and diffuse normal off, the "diffuseNormalWS" gets set to the passed in normalWS, but then normalWS is set to the unpacked and transformed worldspace normal. Doesn't the diffuseNormalWS need to be the same when disabled?

    If I move that block of sampling the normal map and transforming it to the top of the if(enableNormalMapping) statement, then that looks like the intended logic as well as the shader looks to output correctly.
     
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    i see what you mean.

    but actually this is not a bug - it is just a different concept here:
    while you would use the crisp specular normal to light the diffuse the shader uses the "super" smooth per vertex normal.
    thus the diffuse "normals are completely flat" as you mentioned.

    doing it the way you expected might be the more obvious solution. i am not sure. just let me know what you think.

    EDIT: i just uploaded version 1.51 which lets you choose between vertex and specular normals if diffuse normal sampling is disabled :)
     
    Last edited: Dec 21, 2020
  47. PieterAlbers

    PieterAlbers

    Joined:
    Dec 2, 2014
    Posts:
    244
    I am having similar issues using Lit Extended Uber. Smoothness seems to be gone or ignored...
     
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    i just checked the uber shader in 2019.3.9f1 using Lux URP Essentials 7.4.1:
    it works fine for me using the metallic workflow and sampling smoothness from metallic or albedo alpha.
    which workflow do you use?
    have you checked if your smoothness multiplier is not set to anything else but 1.0?

    smoothnessUber.PNG
     
  49. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    sorry, i have missed this.
    cloth lighting nodes for shader graph are part of the package for a long time already. please have a look into the custom shader graph demo scene.
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    that is urp 10+ i guess. you should be able to already add this raising the shader trget to 4.5. and adding something loke #pragma multi_compile DOTS_INSTANCING.
    i will add official support most likely once the deferred renderer is integrated.
     
    Karearea likes this.