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.

[Next-Gen Soft-Shadows 2] Sophisticated dynamic penumbra Shadows for Unity

Discussion in 'Assets and Asset Store' started by tatoforever, Nov 8, 2016.

?

Would you like to buy this on the Asset Store? If so, how much?

Poll closed Jul 10, 2017.
  1. I like it to be priced between 20 to 10$.

    56.8%
  2. I like it to be priced between 10 to 5$.

    39.0%
  3. Zero $, I'm not interested, I love my Unity's default aliased, pixelated horrid-shadows.

    4.2%
  1. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    I remember you mentioned NGSS 2.0 would be ready by Christmas. Is that still true? :p
     
    shamsfk likes this.
  2. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @nomax5
    NGSS is compatible with anything that support shadows in Unity. It's not a system that works side by side, it basically replaces default shadows. Though, there's one minor exception with shaders that uses internal _LightShadowData.r where you need to set it's value to 1 (to avoid opacity fade with point/spot shadows). Other than that it works 100% with all your effects and shaders.

    @ceebeee
    Yeah, sadly that won't be possible but the good news is that I'm working hard on NGSS 2.0. I will soon post some advancements on it. :)
     
    Last edited: Dec 18, 2017
    ceebeee and buttmatrix like this.
  3. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    Folks,
    Update have been pushed to the store (will go live in a day or two). It contains improvements to point light shadows (performance and visuals) and Mobile shadows fix. The rest of the update will be pushed in an early January update.
     
  4. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    395
    What's going to be included in the January update? Also, what benefits enabling 32-bit shadowmaps brings? And I'm also curious if you'll be able to implement shadowmap cascades update rate when NGSS 2.0 will arrive.
     
  5. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @Kolyasisan
    Benefits are more precision in your shadows. Steps to compare are smaller = less shadows artifacts and errors when shadows are extreme large.
    [EDIT]
    It's the same as comparing with color bit depth. The higher the more gradient transitional values you can get. The less bits, the fewer color gradient you can have (banding, fewer color tones, shades of gray, etc). For instance mapping distance to fewer bits = more prone to visual errors as the gaps between each step (or bit) cannot be fill and must be either clamped or totally skipped.

    January update contains last NGSS 1.x feature update which is the cascade improvement.
    I'm kinda right now working side by side NGSS 1.x and 2.0 and on our current project (which uses both of them btw). ^^
    Regards,
     
    Last edited: Dec 22, 2017
    Lex4art likes this.
  6. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    NGSS Mobile shadows optimized with 16taps:
     
    Last edited: Dec 23, 2017
    hopeful likes this.
  7. LifeKILLED

    LifeKILLED

    Joined:
    Nov 15, 2013
    Posts:
    3
    What do you intend to do with lookups for Spot Light? Unity shaders use native shadow sampling and make PCSS lookups impossible. I also conduct experiments with shadows. The best that I got is a texel fetch. In unity shaders correctly works Load functions from DirectX. I make PCF lookups in spotlight with it. But this path works just on Windows. OpenGL texel fetch not works. Do you use other magical tricks?
     
  8. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    I totally skipped depth fetch with spot lights (same reason you described) we can't set built-in render textures types so no PCSS for them in NGSS 1.x. On NGSS 2.0 I'm doing with SRP and I can control shadows render textures types. Plus, since version 2017.2 you can do multiple samplings types per texture. For example fetch depth and fetch shadows compare without the need of a separate texture. So yeah it's not a problem there.
     
    Last edited: Dec 22, 2017
  9. LifeKILLED

    LifeKILLED

    Joined:
    Nov 15, 2013
    Posts:
    3
    Great news!
     
    tatoforever likes this.
  10. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    Folks,
    If you need the NGSS point light shadows fix for 2017.3 don't forget to email support as I think Unity team is on vacations and will probably take longer to be live on the Store.
    PS: If you want extreme cheap but high quals shadows in your project try the new Mobile shadows coming in next update. It's only 16taps optimized with 8! :D
     
    Last edited: Dec 23, 2017
    id0 likes this.
  11. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    Important: Due to the recent addition (Mobile shadows) to NGSS there's a new file that gets into play, a custom AutoLight.cginc that you need to place alongside UnityShadowLibrary.cginc. Read the Documentation (always).

    Release notes from the new version in review:

    - Mobile directional shadows. Currently works if Cascaded Shadows are disabled (Graphics Settings). The bug remains to be fixed by Unity but still better than default mobile shadows. Once it's fixed, you will have Cascaded Shadows on top of it. There's a new option in NGSS_Directional component called "IS_MOBILE". Turn it on if you targeting low end PC or Mobile devices.
    - Compatibility fix for Point Light shadows in Unity 2017.3
    - Improved Point Light shadows filtering and speed. Re-implemented screen space noise stabilization algorithm, optimized a couple of maths there
    - Spot Filtering now gets stabilized at screen space (you'll notice less jumping and randomness). It got also optimized the way
    - Contact Shadows opacity now follows directional shadows opacity

    Video demonstration of Mobile NGSS filtering (no Cascaded version):
    https://s3.amazonaws.com/uploads.hi...U0vwmnLbJF0SV/NGSSMobileShadowsNoCascades.mov
    PS: With cascades it will look exactly the same as in PC. ;)
     
    wunder-ilmari likes this.
  12. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    Hey @tatoforever,

    contact shadows are broken in Unity 2017.3 with SteamVR and single pass stereo rendering. They work fine in multipass. It seems shadows are different for both eyes.
     
  13. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @daschatten
    Yes, I'm working on it and the fix will be available in one of January updates.
     
    buttmatrix likes this.
  14. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    Great, thanks!
     
  15. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    Hello, could you add contact shadow to spotlight and point light? Like in Unreal engine 4?

     
    tatoforever likes this.
  16. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @Danua,
    Planned for NGSS 2.0 but not on initial release. The idea is to do similar to NGSS 1.x live cycle (launch with a basic set of features and add them in minor/major updates so you can get access quickly to new shadows features instead of waiting for the whole absolute thing to be ready). :)
    Regards!
     
    Last edited: Dec 26, 2017
    Danua and Lex4art like this.
  17. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    Ok good to go.)
     
    tatoforever likes this.
  18. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    contact shadows = screen space shadow. isnt it?
     
  19. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @zelmund,
    Yes, ContactShadws both from Unreal and NGSS uses the screen depth buffer to gatter positions. The idea is quite simple, for every frag get an initial distance to light then check depth distances along a ray (light direction) for x amount of units (number of samplers). If base distance is larger than sampled ray distance it means that current frag is occluded thus should be shadowed.
    The reason I din't added ContactShadows to local lights is the same as why NGSS 1.x doesn't have a component to tweak properties individually on every spot/point light = I don't have access to light indexes, so I don't know which light I'm setting properties on (that's why the hack with Shadows Strength to tweak penumbra softness). The default renderer just render meshes with the shaders located in CGInclude folder in a render loop.
    This is not a problem with NGSS 2.0 as it's done with Scriptable Render Pipeline (with HD and Lightweight renderers) and I have access to their sources thus I can add any custom property I want. New shadowing techniques are coming in NGSS 2.0. :)
     
    Last edited: Dec 26, 2017
  20. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @ksam2
    If not related to NGSS product please write to support, I'll be happy to help though.
    And to answer your question yes, bake the outdoor light with shadowmasks.
     
    Last edited: Dec 27, 2017
    ksam2 likes this.
  21. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    Wait scriptable render pipeline?? Really ?But can you say when ynity implement scriptable render loop? Is this that we will have ability to tweak light parameters separately I clear it?
     
  22. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @Danua
    Scriptable Render Pipeline will give you full control over the rendering process. From cameras, lights, shadows and shaders used to render your scenes. Starting in Unity 2018.
     
    alternativevisual likes this.
  23. Meka_Games

    Meka_Games

    Joined:
    Mar 3, 2016
    Posts:
    334
    Something wrong this asset. I'm using this asset only for directional light with default settings. Without contact shadows. FPS is too low. I did the thing for spot light and point light.


    Without NGSS:
    44.png

    With NGSS:
    66.png

    Target platform: PC
    Unity version 2017.1.1
    Quality settings:
    3.png
    Directional Light(Only light in the scene):
    2.png

    And The time to build the game has increased 10 times. Is this normal? Please help...
     
  24. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    Try disabling PCSS filtering. The build time increase has nothing to do with NGSS though.
     
    alternativevisual likes this.
  25. Meka_Games

    Meka_Games

    Joined:
    Mar 3, 2016
    Posts:
    334
    Why does it cost so much performance?
     
  26. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    You should not have such perf drop unless your game was already GPU bound before NGSS.
    What other effects are you using in your game?
    What's the hardware you are testing?
     
  27. kurzemnieks

    kurzemnieks

    Joined:
    Nov 22, 2012
    Posts:
    16
    any chance to get update for 2017.3 ?
     
  28. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @kurzemnieks
    Email support with your invoice number.
    PS: Update is being reviewed by Asset Store staff.
     
  29. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    Folks,
    The update is live on the Store.
    Please don't forget to read the updated documentation, there's two new files you need to add to CGInclude folder.
     
  30. kurzemnieks

    kurzemnieks

    Joined:
    Nov 22, 2012
    Posts:
    16
    never mind, got the update through asset store today! Thanks!!!
     
  31. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    40
    Hi, tatoforever.
    I tried the newest ngss in unity2017.3f3, it operates good!
    But, not working with some other assets.
    ・slightlymad's VolumetricLight script.(https://github.com/SlightlyMad/VolumetricLights)
    If camera is in point light attached volumetriclight script, screen will be pink.
    upload_2017-12-29_22-3-51.png
    and I got this error.
    Trying to access pass 2, but material 'Sandbox/VolumetricLight' subshader (0) has only 1 valid passes.UnityEngine.Material:SetPass(Int32)
    VolumetricLight:SetupPointLight(VolumetricLightRenderer, Matrix4x4) (at Assets/VolumetricLights-master/Assets/Scripts/VolumetricLight.cs:213)
    VolumetricLight:VolumetricLightRenderer_PreRenderEvent(VolumetricLightRenderer, Matrix4x4) (at Assets/VolumetricLights-master/Assets/Scripts/VolumetricLight.cs:188)
    VolumetricLightRenderer:OnPreRender() (at Assets/VolumetricLights-master/Assets/Scripts/VolumetricLightRenderer.cs:319)

    ・At build time shader error with AFS(https://www.assetstore.unity3d.com/jp/#!/content/68907)
    But I can not get this errors after reinstall ngss.
    Shader error in 'Afs_Internal-DeferredShading': 'UnitySampleShadowmap': no matching 1 parameter function at Assets/Advanced Foliage Shaders v5/Shaders/Resources/Afs_DeferredLibrary.cginc(105) (on d3d11)

    Compiling Vertex program with SPOT SHADOWS_DEPTH
    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_HARDWARE_TIER1 UNITY_LIGHTMAP_RGBM_ENCODING
    Shader error in 'Afs_Internal-DeferredShading': 'UnitySampleShadowmap': no matching 1 parameter function at Assets/Advanced Foliage Shaders v5/Shaders/Resources/Afs_DeferredLibrary.cginc(111) (on d3d11)

    Compiling Vertex program with POINT SHADOWS_CUBE
    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_HARDWARE_TIER1 UNITY_LIGHTMAP_RGBM_ENCODING

    ・At build time shader error with UBER(https://www.assetstore.unity3d.com/jp/#!/content/39959)
    Shader error in 'UBER - Specular Setup/ Core - simple (no normalmap)': 'UnitySampleShadowmap': no matching 1 parameter function at Assets/UBER/Shaders/Includes/UBER_AutoLightMOD.cginc(101) (on d3d11)

    Compiling Vertex program with SPOT SHADOWS_DEPTH _WETNESS_NONE
    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_HARDWARE_TIER1 UNITY_LIGHTMAP_RGBM_ENCODING
    Shader error in 'UBER - Specular Setup/ Core - simple (no normalmap)': 'UnitySampleShadowmap': no matching 1 parameter function at Assets/UBER/Shaders/Includes/UBER_AutoLightMOD.cginc(106) (on d3d11)

    Compiling Vertex program with POINT SHADOWS_CUBE _WETNESS_NONE
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_HARDWARE_TIER2 UNITY_LIGHTMAP_RGBM_ENCODING
    Shader error in 'UBER - Metallic Setup/ Core': 'UnitySampleShadowmap': no matching 1 parameter function at Assets/UBER/Shaders/Includes/UBER_AutoLightMOD.cginc(101) (on d3d11)

    Compiling Vertex program with SPOT SHADOWS_DEPTH _WETNESS_NONE
    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_HARDWARE_TIER1 UNITY_LIGHTMAP_RGBM_ENCODING
    Shader error in 'UBER - Metallic Setup/ Core': 'UnitySampleShadowmap': no matching 1 parameter function at Assets/UBER/Shaders/Includes/UBER_AutoLightMOD.cginc(106) (on d3d11)

    Compiling Vertex program with POINT SHADOWS_CUBE _WETNESS_NONE
    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_HARDWARE_TIER1 UNITY_LIGHTMAP_RGBM_ENCODING

    Please give me an answer how to fix it.
     
    Last edited: Jan 2, 2018
  32. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    75
    Hello. Unity 2017.3p1
    Shader error in 'Standard': 'unitySampleShadow': no matching 1 parameter function at /Programs & Games/Unity 2017.3.0p1/Editor/Data/CGIncludes/UnityStandardCore.cginc(437) (on d3d11)
     
  33. danix

    danix

    Joined:
    Nov 15, 2013
    Posts:
    29
    Hi,

    I think NGSS is not working properly in my situation. The shadows looks very noisy, not soft like your example and the only working option is PCSS_GLOBAL_SOFTNER parameter. Changing the other variables does nothing. Unity 2017.3.0p1 - Mobile (Android) Platform, NGSS 1.6.1v.

    1.JPG 2.JPG 3.JPG

    Thanks!
     
  34. SKNKanimation

    SKNKanimation

    Joined:
    Feb 24, 2017
    Posts:
    12
    I had this problem too. I think it's a 2017.3.0p1 problem and not a NGSS problem. I rebaked my lighting on all my scenes and that fixed it for me. <3

    EDIT: I take it back. I can't compile either. Damn!

    EDIT 2: OK Shader issues resolved. Reinstalled with 1.6.1 from the asset store and solved my problems and allowed me to successfully build. 1.6.0 had only 2 files but 1.6.1 has 3 that needed to go into CGincludes. Aces now!
     
    Last edited: Dec 31, 2017
    tatoforever likes this.
  35. TeohRIK

    TeohRIK

    Joined:
    Jan 22, 2014
    Posts:
    106
    Hi, I realize I can't build my project after I update to use latest version of NGSS, everytime I try to build and it fail with a bunch of shader error. I attached the error and I using Unity 5.6.5
     

    Attached Files:

  36. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    Awesome asset.


    This implement in our scene pretty well, destroy every problem with shadow. Awesome.
     
  37. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    But I have only one Issue with custom shader made with:
    'UnitySampleShadowmap': no matching 1 parameter function
    Compiling Vertex program with SPOT SHADOWS_DEPTH SHADOWS_SOFT LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_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_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR

    And some warning to every custom shader. Also made with amplify as well. What does it mean? And how to solve this?
    'i': loop control variable conflicts with a previous declaration in the outer scope; most recent declaration will be used
    Compiling Vertex program with SHADOWS_CUBE
    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_FULL_HDR
     
    Last edited: Dec 31, 2017
    hopeful likes this.
  38. alternativevisual

    alternativevisual

    Joined:
    Apr 16, 2015
    Posts:
    75
    Красиво :)
     
    tatoforever likes this.
  39. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    Hey guys,
    I'm back from holidays, I'm gonna start answering more closely your questions/issues tomorrow.
    Did you guys read the updated documentation? There's now three new files that you need to place in the CGInclude folder. Btw, do not Hit Build n Run as sometimes produces unwanted results, try first Build and then Build n Run.
     
    Last edited: Jan 2, 2018
    TeohRIK likes this.
  40. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    Folks,
    To all of you having build errors with v1.6:
    Apparently there's too many custom shaders calling UnitySampleShadowmap and unitySampleShadow functions with default parameters set (which is only one) and in version 1.6 I've added a second parameter for screen space noise stabilization which is computed in the vertex shader (saves lot of instructions as before it was done in the pixel shader).
    Turns out it was a bad idea as most of custom shaders call those methods with only one parameter thus I'm reverting it back to how it was so you can keep using your custom shaders with NGSS as before. Though, we might lost the quality improvement on noise stabilization introduced in v1.6 (hopefully not).
    This issue have nothing to do with the new mobile shadows addition to NGSS. Was only the noise quality improvement part added in v1.6.
    If you need to build your project, try reverting back to default CGInclude files otherwise keep working normally. I'm working on the fix and will let you know when it's ready.
    PS: Happy new year (quite late though). :D
     
    Last edited: Jan 2, 2018
  41. Carpet_Head

    Carpet_Head

    Joined:
    Nov 27, 2014
    Posts:
    254
    Having to replace default unity files is a really annoying workflow, particularly with large teams and unity updates - it would definitely be preferred to have changes to unity default include files optional
     
  42. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    197
    Hello please say what kind fix need write to restore custom shader work? I've got error

    'UnitySampleShadowmap': no matching 1 parameter function
    Compiling Vertex program with POINT SHADOWS_CUBE LIGHTMAP_ON SHADOWS_SHADOWMASK DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_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_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR

    It's mark this line below:
    ////// Lighting:
    float attenuation = LIGHT_ATTENUATION(i);
     
  43. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @Danua
    You can add "screenPos" as a second parameter to UnitySampleShadowmap and unitySampleShadow functions in your custom shaders. But keep in mind you will have to remove it again once you get the fix.
     
    alternativevisual likes this.
  44. danix

    danix

    Joined:
    Nov 15, 2013
    Posts:
    29

    Hello,

    Some advice about the noisy shadows? I've already replaced the three new files in the CGInclude folder, that's not the problem, maybe I'm doing something else wrong...

    Comparison between your example(image_1) and mine(image_2). Unity 2017.3.0p1 - Mobile (Android) Platform, NGSS 1.6.1v.

    upload.png upload2.JPG

    Thanks!
     
  45. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @danix,
    Hey man, sorry I completely forgot your post. Yes, you can disable the noise filtering to obtain the same result as the left image by commenting the #define NGSS_USE_POISSON_SAMPLING_MOBILE in UnityShadowLibrary.cginc at line 31. You need to delete your project ShaderCache after that modification in order to apply the change.
    PS: Notice that as your kernel varies you will notice banding.
     
  46. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @Carpet_Head
    Unfortunately it's the only way to improve shadows on current default renderer and keep it compatible with all custom shaders available.
    This will change with NGSS 2.0 which is done with SRP where you only have to load the SRP asset in your project once and voila. :)
     
    alternativevisual and buttmatrix like this.
  47. _M_S_D_

    _M_S_D_

    Joined:
    Nov 12, 2013
    Posts:
    511
    I'm having an issue where no shadows appear in builds at all, version 1.6, trying the latest version now. The builds complete, no errors, but in game there are no shadows whatsoever. Anything you've heard about?
     
  48. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    @_M_S_D_
    Are you targeting mobile platforms with spot/point light shadows? If so, then that's normal, Unity does not render spot/point shadows on mobile platforms, only directional. If your target platform is other than mobile then yes, try with the latest version (1.6.1)
    PS: Don't do Build and Run. Try with Build first, then build and run afterwards.
     
  49. _M_S_D_

    _M_S_D_

    Joined:
    Nov 12, 2013
    Posts:
    511
    Nope, not mobile. Windows 32 and 64 bit builds with directional lights as the only shadow casters.
     
  50. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,353
    Try with the last NGSS version and do a normal Build (not Build and Run) and see how it goes?