Closed haath closed 2 years ago
Change the blend mode of the sprite or the tilemap to multiply.
Change the blend mode of the sprite or the tilemap to multiply.
It worked, thanks!
And any tips on how to make it so that the shadowed area is not fully black? For example to specify some ambient light color with some alpha. That way overshadowed objects could appear partially visible, and tinted to some color.
I imagine I'd have to somehow blend the shadows predicate with the tile predicate? But I have no idea where to start.
When it comes to rendering I'm still a complete beginner, so I could make do with any advice on how to get started. I've read the Defold render manuals, but I can't say it's gotten me very far...
Try to change the background color to something like vec4(0.1, 0.1, 0.1, 0). Maybe we should add a section about hiding objects to the manual ?
Can't believe it was that simple and I missed it 😄
Thanks again!
Both in my project, as well as the example in this repository, shadows don't actually hide anything. All game objects just appear with full brightness on top of a black layer.
Ideally I'd like what you expect from a lighting system, that blend in with the darkness, and progressively disappear as they move further from light sources.
Is it possible to get such light/shadow effects with this library? Or more work in the render script is required?
Another issue I've been having, and maybe it's related, is that if I have a tilemap under the whole screen (topdown game) then there is no darkness, the whole map is fully lit. (with and without the light occluder material)
Apologies if I have just misunderstood what this library does! :sweat_smile: