Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

There are two ways to increase the shadow length:

A) Using the shadowLength variable in Crystal_Shadow. You can set it to 20, 40, or more, so that the shadows will go further.

B) Modifying the shadowScattering variable, per light.

Thanks for the kind words ^^ Crystal will be perfect for the hotline miami style.

How is the shadowLength variable used? In my tests it looks like it multiplies the size of the base shadow mesh in order to achieve its length, but I'm not 100 percent sure.

Additonally, how does the depth of light and shadow casters affect anything? I'm also having trouble getting certain objects to render above/below light sources and I figure this has something to do with that.

Apologizes in advance if I have a lot of questions, I'm pretty new to this and sometimes the documentation can be a bit unclear to me.

(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