Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

By setting shadowLength to 1, the length of the shadow will be equivalent to the distance from the light to each vertex of the shadow, in pixels. 2 will be twice that, 3 will be three times that distance, and so on.

To modify the variable, just do shadow.shadowLength = value;

All relevant information related to depth can be found here: Troubleshooting.

No worries, feel free to ask any questions you may have :)

(1 edit)

Alright, thanks. I'm also having issues with soft shadows. On the documentation under the light types section, the direct light preview shows the shadow almost fading out into the light, and I've also seen this behavior in some of the test rooms provided. However, my shadows appear to have hard cutoffs instead (im using SHADOW_SOFT_TRANSFORMED) and don't fade out.  (see img, i'm using a spotlight here but the same issue is still there when i do use a direct light)


Also, soft shadows with a low shadow length appear to not be completely softened, and only the vertexes of the shadow are not the edges in between, however I'm assuming this is intended behavior. Either way, how do I replicate the effect shown in the direct light preview?

This can be solved by setting the light's shadowUmbra to 1