All that found this post on the forum http://www.html5gamedevs.com/topic/7003-creating-mask-that-cut-lightsprite-to-pixel-map-terrain/

I tried to use masks somehow, but it turns out to only crop the image in a geometric shape. http://pixijs.imtqy.com/examples/#/demos/masking.js

Push at least an idea of ​​how this can be done.

Did something like that enter image description here enter image description here

    1 answer 1

    In a primitive version, you can make a polygon with a gradient translucent texture. The advanced version requires knowledge of the geometry of the place, for example, so that the "rays" of light can pass.

    • I don’t understand how in the primitive version you get diffused light, so that it is darker from the back than the front - Serge Esmanovich
    • probably realized that something like this codepen.io/adobe/pen/cnlKt , not exactly what I expected but you can try - Serge Esmanovich