![]() ![]() To wire-in the occlusion for a single player light, you need to place culling occlusion line-segments on every edge of visible walls that isn't shared with another visible wall. What the Hero Sees and the FOV topic on RogueBasin. I'll try to put together a simple demo, but the visibility algorithm is described much better than I could in lots of places e.g. Update: I've created a demo project demonstrating this technique - llasram/godot-visibility-demo. Hopefully that definitively answers this question! The problem is knowing which shadows are undesired, which probably devolves once more to implementing tile-based visibility, only now either doing it in a shader or communicating it to a shader. ![]() Within CanvasItem shaders, the light() function can modify the value of SHADOW_VERTEX to redirect a shadow which would land on a given vertex to land on another vertex instead. This one is purely speculative, as I haven't spent enough time to see if could be made to work. Use a CanvasItem shader with a light processor function to redirect undesired shadows. ![]() (This is what I believe Wibbly is describing in their posted answer.) This prevents any wall from casting shadows on any wall, which leaves all walls visible, but does cast shadows on other objects with the appropriate light mask.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |