Directional light in 2D engine

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Myrmex

Is this kind of light achievable in 2D projects?

Directional 2D light example

I tried placing a really big source really far away so it would appear more “orthogonal” and result seemed quite okay with buffer size around 9KB, yet these shadows were endless.
Is it possible to cut their lengths depending on “height” variables of the casting objects?

I also need a directional light in 2d: i´m using a normal map of a mountain region as seen from above, and the sun obviously has to be the same direction in every point.
Up to now I can only place the source very far away and move it in a very complex way

Andrea | 2018-07-11 09:20