Shadow Softener - Official Thread

Ever wish your shadows were, ya know… Softer? :sweat_smile:

Well this is the Official Support Thread for Shadow Softener, a package that makes your shadows incredibly smoooooth!

If you run into any problems, just let me know and I’ll do my best to sort it out. :wink:

  • Works with Unity Free or Pro!
  • Customize Directional and Spotlight filtering!
  • Beautiful PCF filters, up to 8x8!
  • Write Custom Filters! (sample included)
  • Works in Forward and Deferred renderers!
  • Works with Shader Model 3.0 and above.
  • What are you waiting for!?

[Asset Store] [Documentation] [Webplayer] [Mac Demo] [Win Demo]

Check out what others are doing with Shadow Softener!

(Courtesy of nukeD)

1 Like

What is the performance of these PCF based shadows compared to the normal hard and soft shadow (2 4 cascades)?

I couldn’t help but notice that you said it works with Unity free. Haha, Unity free only has hard shadows, so are you saying that I can have BETTER soft shadows than pro?

I think he was talking about better hard shadows, but if he wasn’t then :smile:

Also an online demo would be good.

Well then again, shadows do exist in Unity free now, therefore the code is there to be customized. :slight_smile:

Edit: I think its REALLY important that you make a simple web demo. I need to know the soft shadows work in Unity free and perform well enough.

Thanks in advance.

Hey guys, sorry for the delay!

I don’t have exact numbers since there are a lot of variables (PCF kernel width, light type), but I’ll try and put a demo together this week that compares them with FPS. :slight_smile:

Yes! I am totally saying that!
Of course, it will only work with the single Directional Light they allow you to cast shadows with. :wink:

Agreed! I’ll try and put one together this week!

I should probably clarify that what Shadow Softener does is customize the way Hard Shadows are sampled before the built-in “Soft” filter takes effect.

This is why it works in Unity Free. :twisted:

It’s also why Unity Pro’s fuzzy “Soft Shadows” filtering can still be enabled on top of Shadow Softener’s result. Although I’m not sure why you would do that! :wink:

Sounds awesome. Another question. I’m not much for coding shaders. Would be really nice if you could post(even on here) spec-bumped shader and a spec-bumped shader for terrain that work with your soft shadows. :slight_smile:

Here’s the built-in TerrBumpFirstPass.shader, modified with PCF8x8. Everything in BOLD was added, which is mostly just comments because the process is very simple! I just tested this shader, btw, and it works flawlessly. :wink:

If you ever buy Pro and use Deferred Rendering, none of this is necessary… It just works!

Because the Terrain shaders use both a Base and Add shader, you would want to do the exact same thing to the TerrBumpAddPass.shader version referenced by the Dependancy at the bottom… Terrain/Tree shaders are pretty much the only time you’ll run into this sort of thing… Most shaders are one-off. :wink:

The Documentation goes over most of this in more detail!

Hey everyone!

There’s been a lot of questions about the differences between [Shadow Softener] and [Sunshine!], so I thought I’d attempt to clarify here:

Shadow Softener:
A system to control the way the existing built-in shadows are sampled.

Pros:

  • Support for any number of Directional and Spot lights.
  • Support for Unity Free (they allow shadows on a single Directional Light)
  • Support for up to PCF8x8!
  • Support for Custom Filters
  • In the Forward Renderer, you don’t have to edit every shader, you can simply tweak shaders you feel could use extra soft shadows (floors/walls). Sunshine is more of an all-or-nothing system. If you use the Deferred Renderer, it’s all automatic, just like Sunshine. :wink:

Cons:

  • Only runs on platforms where the built-in shadows already work, so no Ouya support.
  • Large PCF kernels often run into “Shadow Acne” problems, but I’m using some per-sample bias trickery to eliminate it as much as possible.

Sunshine
A shadow implementation that’s completely separate from the built-in one, yet tries to match settings/behavior as closely as possible.

Pros:

  • Has access to all shadow data, to do things like Volumetric Lighting… I have plans to explore other effects as well, I’ve just been too busy adding requested features!
  • Has a great Overcast Shadow effect. This is better than any “Light Cookie” thing built-in. It blends nicely, and uses a virtual “cloud plane” with adjustable height for calculations.
  • Up to PCF4x4 filtering.
  • Can run on normally unsupported platforms like Ouya/Tegra 3 devices
  • Control over when the shadow map should be refreshed (ie. after X frames, or after the camera moves X amount, even manually)… Great for Mobile
  • Control over the shadow bounds… so you can have it match your main character, using a low 128x128 shadow map can be more than enough… Also great for Mobile.
  • Many little niceties like MSAA-friendliness, Alpha objects that can cast cutout shadows, etc.
  • Reduced Fillrate - One of the reasons I wrote Sunshine is I was working on an app that would slow down with built-in shadows because it ran at a high resolution and the extra “collector” pass was too much fill. Sunshine has no “collector” pass. :wink:

Cons:

  • Only works with a single Directional Light
  • Requires changes to shaders if you use the Forward Renderer (Deferred is automatic), but pretty much every built-in shader is already edited for you, and Sunshine will automatically swap them in/out as you require.

Hey Everyone!
Just got a demo up (Web/Mac/Win) to demonstrate quality vs. performance!

Keep in mind the Unity Webplayer is limited to 60fps. :wink:

[Webplayer] [Mac Demo] [Win Demo]

This is creating BEAUTIFUL shadows in my scene!

Somehow several of the shaders on our “Tree Creator” trees have turned grey. Has anybody come across this problem??

Image attached, thanks ahead.

Wow, those look nice. 4x4 PCF is a nice compromise to get rid of the ugly jagged edges.
One question remains: Why isn’t this available in vanilla Unity?

Double Post

Really impressive work!!! Thank you from Free.
That and indie glow and I have most of what I need from Pro.
Great job.

Already in my to-buy list :smile:

oops (reposted below, I meant to edit this one :sweat_smile:)

I just remembered that I also imported JXL Rendering tool at the same time, I’ll look into it on my end.
Cheers,
jimmy

Glad to hear you like the shadows!
Strange about the “grey” issue, I haven’t run into this before. If you send me a project that reproduces it, I’ll investigate. :slight_smile:

Just going out on a limb here, but we might have stumbled onto a government coverup perpetrated by the NSA! :shock:

I aim to please! :sunglasses:

Yes, follow your heart! :mrgreen:

Sounds good. Just let me know if there’s anything I can do to help. :slight_smile: