Search Unity

Shadow Softener - Official Thread

Discussion in 'Assets and Asset Store' started by PolyVector, Sep 11, 2013.

  1. Zapgun

    Zapgun

    Joined:
    Jun 3, 2011
    Posts:
    50
    Hi PolyVector,

    I don't seem to be able to get this working in Unity 5 with directional lights (ether in deferred or forward render modes) and your example scene only uses spotlights. Can you provide an example working with directional lights, or provide a more detailed document example of how to get this going? I've tried this with a completely blank scene and a few objects with no results.

    Cheers and thanks,

    Zap
     
  2. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    The example scene is only using Spotlights because as of Unity 5, all directional shadows are handled in a "deferred" way by a replacement copy of the "Internal-PrePassCollectShadows" shader. Because of this, the example scene can't demonstrate the difference between built-in and softened directional shadows, since they are all softened.

    Check to see if there are any other copies of "Internal-PrePassCollectShadows" in your project. If you have any, you will need to remove them and restart the Editor for Shadow Softener to take effect.

    You can verify that Shadow Softener is working by editing "ShadowSoftenerConfig.cginc" and changing the SOFTENER_FILTER define.

    I hope this helps,
    Oren
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    Hey Oren,
    Just bought your plugin, it's just too nice, and now McD looks like it was blessed by Area Lights!


    Another game I'm making for ipad air 2 looks like PCF2x2 and I used PCF8x8. Is the softening limited or applied in screen space?
     
    CFprime likes this.
  4. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Your game looks amazing. :)

    The shadows aren't filtered in screenspace, they are in shadow space like regular PCF. Mobile shaders are going to require modification to work since they don't use the regular desktop-style shadow collection pass which can be globally replaced. This means following the part of the documentation that has you #define SOFTENER_FILTER and include ShadowSoftener.cginc.

    Hope this helps.
     
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    Thanks :)
    If I understand you, this is the shader after being modified for mobile.
    Code (CSharp):
    1. Shader "-- Illum Diffuse" {
    2. Properties {
    3.     _Color ("Main Color", Color) = (1,1,1,1)
    4.     _ShadowColor ("Shadow Color", Color) = (0.2,0.1,0.3,1)
    5.     _MainTex ("Base (RGB) Gloss (A)", 2D) = "white" {}
    6.     _Illum ("Illumin (A)", 2D) = "white" {}
    7.     _EmissionLM ("Emission (Lightmapper)", Float) = 0
    8. }
    9. SubShader {
    10.     Tags { "RenderType"="Opaque" }
    11.     LOD 200
    12.    
    13. CGPROGRAM
    14. #pragma surface surf WrapLambert addshadow fullforwardshadows
    15. #pragma target 3.0
    16. #define SOFTENER_FILTER PCF8x8
    17. #include "Assets/Shadow Softener/Shaders/ShadowSoftener.cginc"
    18.  
    19.  
    20. sampler2D _MainTex;
    21. sampler2D _Illum;
    22. fixed4 _Color;
    23.  
    24. half3 _ShadowColor;
    25.  
    26.  
    27. half4 LightingWrapLambert (SurfaceOutput s, half3 lightDir, half atten) {
    28.     half NdotL = dot (s.Normal, lightDir);
    29.     half diff = NdotL * 0.3 + 0.7;
    30.     half4 c;
    31.     c.rgb = s.Albedo * _LightColor0.rgb * (diff * atten) + s.Albedo * _ShadowColor.rgb * (1-atten);
    32.     c.a = s.Alpha;
    33.     return c;
    34. }
    35.  
    36.  
    37. struct Input {
    38.     float2 uv_MainTex;
    39.     float2 uv_Illum;
    40. };
    41.  
    42. void surf (Input IN, inout SurfaceOutput o) {
    43.     fixed4 tex = tex2D(_MainTex, IN.uv_MainTex);
    44.     fixed4 c = tex * _Color;
    45.     o.Albedo = c.rgb;
    46.     o.Emission = c.rgb * tex2D(_Illum, IN.uv_Illum).a;
    47.     o.Alpha = c.a;
    48. }
    49. ENDCG
    50. }
    51. FallBack "Self-Illumin/VertexLit"
    52. }
    53.  
    Here is the editor (all soft and cuddly) vs the ipad air 2 (all harsh ...and full of gaps) that's on unity 5.0.2f1


    air 2
     
  6. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Strange, it looks like the replacement shadow filter isn't being injected properly. I'll do some testing this week and see if I can't spot the problem.

    Thanks for pointing this out.

    Edit: I should have mentioned that the "gaps" you see are Unity's new "Normal Bias" feature, nothing to do with Shadow Softener. I filed a bug report with the cause (and a description of how the biasing should be calculated) a few weeks ago, hopefully they'll fix it. The workaround I use in my projects is to set the "Normal Bias" to 0.
     
    Last edited: May 27, 2015
  7. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    The shader you posted works perfectly for me on a Nexus 9 (GLES 3.0). It could be a difference between Metal and OpenGL, but I don't have an iPad to test with unfortunately.

    If you get the chance, I have a couple of tests you could run that might help to figure this out.

    Find the following line in ShadowSoftener.cginc:
    Code (csharp):
    1. #elif (defined(SHADER_API_GLES) || defined(SHADER_API_GLES3)) && defined(SHADER_API_MOBILE)
    Change it to this:
    Code (csharp):
    1. #elif defined(SHADER_API_MOBILE)
    You'll have to reimport your Illum shader and anything else that uses ShadowSoftener.cginc for the changes to take effect.

    If that doesn't work, could you try targetting "Open GL ES 3" (in the Player Settings), to see if that has an effect.

    Sorry for the inconvenience, I plan on getting set up for iOS development this year.
     
  8. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    Thanks. GL ES 3 works, and kills the frame rate own to 40Hz :)
    Metal with your changes works also and kills the frame rate even more down to 9Hz
    Interesting.

    Note that switching to pcf4 or pcf4x4 (difference?) doesn't speed things up nor change the look of the shadows.
     
    Last edited: May 27, 2015
  9. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    PCF8x8 is probably infeasible on mobile, but it is strange that changing it to PCF4x4 wouldn't affect the look/speed.
    If I had to guess, it sounds like Unity might be using the "Shadow Collector" pass on Metal, which means that Shadow Softener is running 2x (once for your modified shader, once for the Collector pass). This would explain the slowdown anyway. If this is the case, you'll want to remove Shadow Softener support from your shader, and edit the configuration in ShadowSoftenerConfig.cginc to control how the Shadow Collector is filtered.
     
  10. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    I removed the shadow softener from the shaders and increased the default PCF to 8x8, built, baked and now I have shadows that look like the default blur from unity, light and quality are set to hard shadows, off course, it wouldn't be much fun otherwise.
     
  11. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    Would you know what causes this subtle rounded shadow over the water? (same -- illum shader, brought back the pcf code in it for editor tweaking)
     
  12. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    It looks like self-shadowing/acne to me. You could adjust the light's Shadow Bias, but in this case I would recommend turning off shadow casting for the water assuming there's no reason it would need to cast shadows. It will have the added benefit of reducing fillrate and probably improving performance.

    As for the performance drop you've described, it sounds to me like everything is "working" fine (except for the mystery of why changing the filter had no effect for you), so I must admit ignorance as to why Metal would render the shadows so much slower. Unity 5.1 will supposedly bring a new unified OpenGL backend, which might make these types of issues easier to track down since we'll be able to run the mobile shaders directly in the editor.
     
  13. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    I tuned Bias and got better results. Thanks.
    If I keep this blue plane as the water, or something equally flat looking, I'll want shadows. What I'll do is turn off PCF for the larger receivers but I doubt this will help because the game has many of those islands.
    Is there a way to LOD the shaders in a way that turns off PCF at a distance?

    I switched back to ogl 3 and it's running fast again so this is not a big deal for now but when you have an ipad, I'll be curious to read what you discover about metal. From my experience it doesn't speed things up so maybe the shaders need to be written for metal to take advantage of the nice stuff.
     
  14. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I meant you could disable shadow casting on the water, since I wouldn't imagine anything under it would be visible.
    A regular LOD Group could be used to swap out renderers/materials/shaders and switch to a simpler version far away.
    I'm very curious to dive into iOS/Metal in the next few months, surely I'll learn things that will benefit our assets. :)
     
  15. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Shadow Softener 1.4.2 is Available on the Unity Asset Store
    • Fixed Shadows not applying on Metal
    • Fixed errors with unsupported SHADOWS_SCREEN passes
     
  16. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
  17. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Shadow Softener 1.4.0 and above is Unity 5.x only, 1.3.4 and below are for Unity 3 and 4.
     
  18. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    Is there another bias setting other than the light's?
    Still venician blinds at 0.32 and above that shadows start disappearing.
     
  19. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Decrease the shadow kernel (PCF), or increase the shadow resolution. There is a Normal bias in Unity 5 that is extremely useful.
     
  20. CFprime

    CFprime

    Joined:
    Feb 6, 2015
    Posts:
    27
    Just started a new project. I am getting shadow softening on direct light, but not spots.

    Everything is set to deferred.

    Modifying the config file adjusts the direct shadows, but not the spots and it is not my previous issue of scale.

    Any guesses?
     
  21. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Just tried this using the latest Shadow Softener and Unity 5.1.1f1 and everything worked correctly. make sure you have Shadow Softener's Deferred shader selected in Project Settings->Graphics

    Edit: If you keep having this problem, feel free to send me a small sample project that reproduces the issue so I can see if it's related to your particular configuration.
     
  22. CFprime

    CFprime

    Joined:
    Feb 6, 2015
    Posts:
    27
    I'm still in 4.x. Have the same install as the previous project of SS which worked fine.

    Figured it might be something obvious if it was just spots and points not working but direct does.

    This defiantly isn't a bug. I must have missed something.
     
  23. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    It might be the shaders you're using... some shaders are forward-only, so it doesn't matter if your camera uses Deferred/Prepass rendering. In this case, Directional shadows would soften, because this is done from a replacement shadow collector, but Point/Spot wouldn't because they would need "fullforward" shadows and Shadow Softener integration.

    That said, I highly recommend updating to Unity 5, especially now that most Pro-only features are available in Free.
     
  24. CFprime

    CFprime

    Joined:
    Feb 6, 2015
    Posts:
    27
    Thank you. That is just enough info for me to hunt it down. I'll post the solution when I get there.
     
  25. CFprime

    CFprime

    Joined:
    Feb 6, 2015
    Posts:
    27
    Ok, I tracked it down.

    I have made changes to the built in shaders Internal-PrePassLighting and so have you.

    Strangely the editor does not throw an error if there are more than one in the assets. Likely because they are shaders and not C#. So after looking at your setup I realized that my version was being executed, but not yours.

    All I need to do is add my lighting changes to your file and remove the duplicate.

    Cheers.
     
  26. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Ah, Excellent! Wish I could take credit, but I'm glad you were able to solve this. ;)

    Cheers,
    Oren
     
  27. jwilliamsen

    jwilliamsen

    Joined:
    Aug 8, 2010
    Posts:
    56
    Hmmm - OK - I'm a little stunned that to implement this I'm required to edit the shaders manually (!?) - a helper configuration script would be super-useful for those of us who aren't coders by trade yet want to use what your product offers.

    I'm in Unity 5.1.1, I installed the package in an existing project (Forward rendering) and added "PCF8x8" to line 134 of the ShadowSoftener.cginc. Since I didn't see any effect (same old hard shadows), I deleted the Internal-PrePassColledShadows that wasn't in the Shadow Softener directory (as mentioned in a post above) - this promptly broke my shadows alltogether (i.e. no shadows).

    I would appreciate some pointers as to what might be happening or where I should put specific shaders in the Project to get this working.

    Oh - and for what it's worth - when I select the Internal-PrePassCollectShadows shader in the Shadow Softener directory (or subdirectory thereof) I get a number of syntax errors in the Inspector window: < syntax error : unexpected integer '8L' > for dx9 and dx11 and an < " : Invalid expression > for opengl

    Thanks
     
    Last edited: Jul 7, 2015
  28. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I try my best to document Shadow Softener and provide a link to the docs for people to check out before purchase so there's no surprises. I'm sorry if you feel anything was misleading, and I'd be happy to offer a refund if it's not what you were expecting. Just PM me with your purchase number if you'd like this.

    You should never need to edit ShadowSoftener.cginc, and I highly recommend that you do not attempt it, this file can be intimidating even to a shader guru

    Regarding Internal-PrePassCollectShadows, it's very likely that you need to restart the Unity Editor after swapping it out, since Unity doesn't automatically refresh this file and there's no interface to force it to. This often resolves the type of issue you described.

    As always, I recommend taking the time to read through the docs to learn about configuring the shadow filtering. This is usually done in ShadowSoftenerConfig.cginc and everything should pretty much "Just Work" once configured for Directional shadows in all 3 renderers (Forward, Deferred, and Prepass), as well as Point+Spot lights in the Deferred and Prepass renderers.

    The only time you should really need to modify a shader is with Forward Point and Spot light shadows. These require changes to the forward shader itself, and there's simply no way around this. I've tried to make this process as painless as possible, and it should generally only require a few lines of code copy/pasted from the Documentation.

    I hope this helps,
    Oren
     
  29. jwilliamsen

    jwilliamsen

    Joined:
    Aug 8, 2010
    Posts:
    56
    Hi Oren,

    Thanks for the super-speedy reply. Not trying to be combative or attacking you - more constructive criticism. A video might be very helpful as well for those of us who are "code challenged".

    I actually did read the documents - a couple of times - but I mistakenly chose the wrong file to edit - mea culpa. I took all of the Shadow Softener stuff out of the project and restarted the editor - it took doing this twice for Unity to recreate the Internal-PrePassCollectShadows shader - but on the second start my shadows were back. I went ahead and reimported the Shadow Softener package and this time edited the *correct* file. The shadow changes at that point were subtle but noticeable. The big change came when I started tweaking the cascade splits in the Quality settings and the shadows went from sharpish-but-smooth to oh-so-much-nicer soft. It made a very nice improvement to the scene I'm working on.

    I would still stick with my suggestion as to doing a video, or, having a configuration script that would make the changes - i.e. open a control panel/UI widget, check the boxes you want - and hit apply - kind of like the older shader modification system you had in place for the earlier versions of Shadow Softener. The issue I ran into with the docs is that it's a bit hard to tell what's what in them - maybe just making it more obvious what part is commentary and what part is something you'd see in the config panel... Just my $.02 ;)

    Thanks again,

    Joe
     
  30. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Oh, that's great to hear that it's working properly now, hopefully it behaves itself from now on. :)
    Thanks for the suggestions, let me know if you run into any other issues.

    Cheers,
    Oren
     
  31. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    re 5.x, the doc could be clearer
    "Go to the Edit->Project Settings->Graphics menu and select Shadow Softener's replacement Deferred/Prepass shader."
    Which shaders are these? exact name please. Ideally an image.

    I've dropped in ShadowSoftener-DeferredShading, Internal-PrePassCollectShadows and ShadowSoftener-PrePassLighting
     
  32. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    • The Deferred Shader is Shaders/Deferred/Resources/ShadowSoftener-DeferredShading
    • The Prepass Shader is Shaders/Deferred/Resources/ShadowSoftener-PrePassLighting
    You only need to use the shader appropriate for the renderer you're using, but dropping them both in place doesn't hurt anything.

    The Internal-PrePassCollectShadows works automatically (in all renderers), but for some reason Unity didn't include an interface for selecting this shader. I recommend restarting the Unity Editor if you haven't already to ensure this shader is properly loaded.

    Hope this helps,
    Oren
     
  33. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    It all works, and is so soft...
    But weird stuff on ios, although I remember you don't recommend PCF on these.
     
  34. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Yeah, PCF on mobile can be pretty expensive, although devices have come a long way in the last couple years.
     
  35. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,364
    air2 is magic!
    Although I'm finding that 5.1.1 is much slower on ios, what's your experience?
     
  36. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I haven't been able to test on iOS yet, so I couldn't say.
     
  37. fisherman_b

    fisherman_b

    Joined:
    Dec 18, 2014
    Posts:
    36
    Hi,

    I purchased Shadow Softener a few hours ago. I read the documentation (pdf file) and followed the steps there - without avail. I read about half of this forum thread to find hints why it does not work but I gave up now.To be honest, this is not too professional and pretty time consuming.
    I imported the package into Unity 5.1 (64 bit Windows). I have a single directional light with shadows set to hard. The camera and the build settings are set to Deferred rendering. In the project graphics settings, I set the Deferred shader to Custom and chose ShadowSoftener-DeferredShading (there is no setting for a PrePass Shader that people talk about in earlier postings so I ignored it). So these are exactly the steps described. Graphics engine for iOS is set to OpenGL ES 3.0. When running in the editor, the shadows look softened. When running on my iPad Air (iOS 8.3), there is no effect.

    Please enlighten me with any missing information how to set this package up to produce softened realtime shadows on iOS.

    Thanks
     
    Last edited: Jul 12, 2015
  38. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Hello,
    I'm sorry you're having trouble with Shadow Softener, I've tried to make the setup as straightforward as possible, and in most cases this only means selecting ShadowSoftener-DeferredShading in the Graphics settings, no way around that.

    I don't generally recommend using large-kernel PCF filtering like Shadow Softener on Mobile devices, it can be especially expensive to run. These platforms often require a bit more setup as well, since Unity makes special optimizations like foregoing the shadow collection pass entirely and forward-rendering shadows, which means having to include Shadow Softener in the shader itself. I'm not sure if this is true on iOS+Deferred, since I've never used it.

    I'm going to investigate how shadows are rendered on iOS+Deferred right now and see what's required to get Shadow Softener working.
     
  39. fisherman_b

    fisherman_b

    Joined:
    Dec 18, 2014
    Posts:
    36
    Hi,

    I purchased Shadow Softener because you recommended it to me after I listed my requirements in the Sunshine thread several weeks ago (dynamic soft shadows on iPad Air or better).
    http://forum.unity3d.com/threads/sunshine-official-thread.193956/page-18#post-2110384

    I am aware that you cannot provide instructions for all the shaders out there, but I really think you should provide some basic information in the docs about the standards, meaning "how to adjust the Unity Standard shader to make it work with Shadow Softener on Desktop/Mobile". If somebody has to go further, he can come here or try his own plumbing.

    Thanks
     
  40. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    I've been running tests all morning and did find a regression bug in the last update that breaks Directional Shadows on GLES3, I'll try to get out an update today. This only affects Forward rendering though, so I'm not sure why the Deferred path wouldn't have soft shadows on iOS. I don't own any iOS devices that support the new Deferred path due to the MRT requirement, and testing with my Android tablet everything worked out of the box, but it's possible there's a platform difference.

    There is a version of the Standard Shader pre-modified and included in the Shaders/Forward/Samples/ folder. It's configured for PCF8x8, but can be easily changed. You shouldn't need any modified shaders for Deferred rendering though.

    In all fairness my suggestion was to stick with the built-in shadows to avoid frustration. I'm not aware of any alternatives to Shadow Softener, so since soft shadows are crucial for your project there isn't much choice. If it's not working out however, I'd be happy to offer a refund.
     
  41. fisherman_b

    fisherman_b

    Joined:
    Dec 18, 2014
    Posts:
    36
    Hi,

    you are right that Shadow Softener seems to be the only choice (or perhaps Sunshine), because Unity does not provide soft realtime shadows on iOS at all. The available shadows are blocky and ugly as hell, of course especially from bigger distances. Some time ago I read in a forum post by the Unity staff that there are plans to improve this situation, but there is no schedule for this. So nobody knows when this will happen.

    I am sending you a PM in parallel to find out how to proceed.

    Thanks
     
  42. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Shadow Softener 1.4.3 is Available in the Unity Asset Store
    • Fixed Forward Directional Shadows on Mobile platforms.
    • Fixed "int modulus" warning.
     
  43. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Shadow Softener 1.4.4 is Available in the Unity Asset Store
    • Upgraded Standard Shaders to bring parity with Unity 5.1.1
    • Fixed issue with Standard Shaders and Mobile Shadows.
    • Included fixes from 1.4.3 which were mistakenly left out of the previous release.
     
  44. Shiraek

    Shiraek

    Joined:
    Jan 7, 2013
    Posts:
    6
    edit -> project settings -> graphics only shows included shaders for our project, nothing else. So can't follow the installation instructions.

    Any idea what might be causing that? We're on 4.6.5f1
     
  45. Shiraek

    Shiraek

    Joined:
    Jan 7, 2013
    Posts:
    6
    Update: It seems to be working despite not being able to follow the instructions. Installing the package enabled it.
     
  46. Olafson

    Olafson

    Joined:
    Aug 7, 2012
    Posts:
    255
    Sorry for sounding Dumb, but I am confused.

    How can I make Shadow Softener work with Unity5 Uber shaders? Both Shadow Softener and Uber require changing the deferred shader.
     
  47. PolyVector

    PolyVector

    Joined:
    Dec 24, 2011
    Posts:
    765
    Not dumb at all, a good question. :)

    The simplest way is most likely to keep using your "Uber" Deferred shader, but edit it to add Shadow Softener support. Look for this line in Shadow Softener's Deferred shader, and add it to the same place in the "Uber" Deferred Shader:

    Code (csharp):
    1. // =================================== BEGIN SHADOW SOFTENER SUPPORT ===================================
    2. #include "ShadowSoftenerInjection.cginc"
    3. // =================================== END SHADOW SOFTENER SUPPORT ===================================
    Note: you will have to change the include path since the "Uber" shader will be in a different folder. I believe that "Assets/Shadow Softener/Shaders/Deferred/Resources/ShadowSoftenerInjection.cginc" should work.

    Hope this helps!
    -Oren
     
    hopeful likes this.
  48. Olafson

    Olafson

    Joined:
    Aug 7, 2012
    Posts:
    255
    Thank you!
     
  49. Skunkie

    Skunkie

    Joined:
    Jul 2, 2012
    Posts:
    75
    Shadow Softener 1.4.5 is Now Available in the Unity Asset Store
    • Improved PS4 Support
     
  50. dahuilang

    dahuilang

    Joined:
    Jun 5, 2014
    Posts:
    32
    dose Shadow Softener 1.4.4 support webgl, there are some errors when i bulid webgl

    Failed running D:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "D:\unity_space\TestShadowSoft\Temp\StagingArea\Data\Managed" -l none -c link -x "D:\Program Files\Unity\Editor\Data\Tools\native_link.xml" -f "D:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors" -x "D:\unity_space\TestShadowSoft/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -d "D:\unity_space\TestShadowSoft\Temp\StagingArea\Data\Managed"

    stdout:
    SweepReport:
    System.MonoType => Mono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinition
    Mono.Cecil.MethodDefinition => System.Configuration.Internal.IInternalConfigRoot get_Root()System.Void Init(System.Type,System.Object[])System.String NormalizeLocationSubPath(System.String,System.Configuration.Internal.IConfigErrorInfo)System.Object CreateConfigurationContext(System.String,System.String)System.String DecryptSection(System.String,System.Configuration.ProtectedConfigurationProvider,System.Configuration.ProtectedConfigurationSection)
    Mono.Cecil.FieldDefinition => System.Configuration.ContextInformation evaluationContextSystem.Configuration.ConfigurationSaveEventHandler SaveStartSystem.Configuration.ConfigurationSaveEventHandler SaveEndSystem.Configuration.ConfigurationElementProperty elementPropertySystem.Boolean systemWebInUse
    Fatal error in Mono CIL Linker
    System.IO.IOException: Sharing violation on path D:\unity_space\TestShadowSoft\Temp\StagingArea\Data\Managed\mscorlib.dll
    at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
    at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
    at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
    at Mono.Cecil.ModuleDefinition.GetFileStream (System.String fileName, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
    at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0
    at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.OutputStep.OutputAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.OutputStep.ProcessAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)
    UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)
    UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121)
    UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:452)
    UnityEditorInternal.IL2CPPBuilder:StripAssemblies(String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:440)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:287)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218)
    UnityEditor.HostView:OnGUI()