Shadowmask vs DistanceShadowmask

why does it say that distance shadowmask has better quality in the documentation?

so from what i understand, shadowmask = baked shadows, distance shadowmask = realtime. at least that’s the behaviour i observe when setting the light from distance shadowmask to shadowmask. hence, wouldn’t shadowmask just always be better since its precomputed? i get fuzzy edges and flickering in the shadows, unless i turn up the resolution to ultra.

Light set to default medium Distance Shadowmask:

Light set to Shadowmask:

also, it took me some time to figure out what the difference between shadowmask vs baked indirect was for mixed lights, because the lights didn’t use the baked shadows automatically. i had to set that shadows settings to shadowmask in the inspector for the lights to utalise the baked data. shouldn’t it be on by default, so that it always uses bake shadow data?



Heya, looking at the docs there’s a lot more there. Is any of this answering your question?

With the Distance Shadowmask quality setting
When you set a Scene’s Lighting Mode to Shadowmask and your Project uses the Distance Shadowmask quality setting, Mixed Lights behave as follows.

  • Dynamic GameObjects lit by Mixed Lights receive:

  • Real-time direct lighting.

  • Baked indirect lighting, using Light Probes.

  • Real-time shadows from dynamic GameObjects, using the shadow map, up to the Shadow Distance.

  • Real-time shadows from static GameObjects, using the shadow map, up to the Shadow Distance.

  • Baked shadows from static GameObjects using Light Probes, beyond the Shadow Distance.

  • Static GameObjects lit by Mixed Lights receive:

  • Real-time direct lighting.

  • Baked indirect lighting, using lightmaps.

  • Real-time shadows from dynamic GameObjects, using the shadow map, up to the Shadow Distance.

  • Real-time shadows from static GameObjects, using the shadow map, up to the Shadow Distance.

  • Baked shadows from static GameObjects, using the shadow mask, beyond the Shadow Distance.

With the Shadowmask quality setting
When you set a Scene’s Lighting Mode to Shadowmask and your Project uses the Shadowmask quality setting, Mixed Lights behave as follows.

  • Dynamic GameObjects lit by Mixed Lights receive:

  • Real-time direct lighting.

  • Baked indirect lighting, using Light Probes.

  • Real-time shadows from dynamic GameObjects, using the shadow map, up to the Shadow Distance.

  • Baked shadows from static GameObjects using Light Probes, up to and beyond the Shadow Distance.

  • Static GameObjects lit by Mixed Lights receive:

  • Real-time direct lighting.

  • Baked indirect lighting, using lightmaps.

  • Real-time shadows from dynamic GameObjects, using the shadow map, up to the Shadow Distance.

  • Baked shadows from static GameObjects, using the shadow mask, up to and beyond the Shadow Distance.

1 Like

what is more performant, a distance shadowmask with update mode set to on enable or baked shadow map?
would on enable remove all of the cost associcated with making the shadows?

5963186--639446--Screenshot 2020-06-10 at 15.31.07.png

The Distance Shadowmask mode is more expensive than the normal Shadowmask mode.
Because in Distance Shadowmask mode, both dynamic and static objects can cast realtime shadow maps within the set shadow distance. Beyond this distance static objects get shadows from other static objects from the shadowmask mask. So more shadows means more draw calls.

Therefore Distance Shadowmask is for high-end hardware while normal Shadowmask is a cheap solution for low-end to mid-end hardware.

1 Like

I’ve been really nailing down my lighting work flow. I want to have realtime shadows from static objects cast onto dynamic objects, but I also want the same static objects to cast baked shadows onto other static objects. Otherwise you don’t see things like baked shadow angle or baked shadow radius on the static environment. Is there any way to achieve that? I want static to static shadows to be baked and have soft edges.

Hi
Please create a new thread if you have a new question :slight_smile: Thanks

1 Like

Will do, and thank you for your Unite talks, they were some of the most helpful resources in understanding all of this.

1 Like

Thank you, and you are welcome :slight_smile: I had fun doing them, and happy they help people. Have you watched the latest “Baking at the speed of light”? Cheers :slight_smile: