How to switch between SOFT and HARD shadows?

There is a tutorial about shadows and in that tutorial there is a section about HARD and SOFT shadows. The default shadows are SOFT but I want to use HARD shadows. How can I do that? There is no property on pc.Material or pc.StandartMaterial related to hard/soft shadows.

I think you refer to this:

"The shadow sampling type is specified per material and so the option can be found in the Material Editor in the Other section."

From this manual page: https://developer.playcanvas.com/en/user-manual/graphics/lighting/shadows/

Good point, I think this has changed several years ago and most likely the manual didn’t get updated. Right now I don’t see a way to generate hard shadows given the current settings (unless I put a crazy short shadow distance when using PCF).

@will or @max may be able to comment on that.

Also just ran into this. Is there perhaps a setting that used to be here that’s missing now?

image

It’s not on the material but on the light that is casting the shadow.

Change the shadow type:

1 Like

Thanks @yaustar! I had seen that setting but none of the options seemed to get the hard shadows I was looking for.

I just tried it again now and noticed the “blur size” slider I can push down to 1 and that works! These are the settings I ended up going with if it helps others:

image

3 Likes