I am working on a lighting system for tile-based games. It's nothing too fancy. The code and input images are at https://github.com/sjhalayka/light_blocking_asymmetric
I am having an issue. Whenever the input images are asymmetric (e.g. width != height), the lighting goes haywire. Here are some images:
Symmetric input works great:
Asymmetric input is all messed up:
Any ideas on what bug I'm missing? I've checked the code multiple times, but to no avail. Thanks for your time!