SakeTami
FluffyQuack
FluffyQuack

patreon


Diablo mod progress - Per-pixel lighting and hardware rendering

Just thought I'd write a bit about Diablo shenanigans I've been doing the past weeks. The video above shows a very basic test of per-pixel lighting (the ingame graphics are rendered at full brightness and then I blend a lightmap on top of it). I'm in the process of converting all of the rendering code to use GPU which will make it possible to experiment more with lighting (right now it's only the UI which is rendered via GPU, so I can't render lightmaps between walls and floors for instance).

Here are more videos of stuff I've been experimenting with:

https://www.youtube.com/watch?v=UkanSKIR8-Q - Line of sight test. I think this would be a neat feature to add, but it requires fiddly math to do correctly (in this example I'm tracing rays from the player position, but even with hundreds of rays there are gaps in the resulting line of sight).

https://www.youtube.com/watch?v=UWy_WlZ7teY - All walls rendered opaque with player, enemies, and items rendered as silhouettes when behind walls. I think the graphics look a lot nicer like this as I like the opaque walls so I wanna try to get this properly implemented once I've got all graphics rendered via GPU.

https://www.youtube.com/watch?v=mqnuMBDzIrM - Similar to above, but with a "see-through window" instead of silhouettes. I personally prefer the silhouettes.

https://www.youtube.com/watch?v=lwQZLIeBA6Y - By default, lighting in the game works by lighting up tile by tile. In this test, I made the lighting treat each tile as consisting of 16 "sub-tiles" and applied lighting based on that (I'm switching between the new and old lighting). But it's only barely noticeable. I did a poor job writing an algorithm for lightning up tiles around the player, and also, I think there's much more potential in experimenting with doing lighting on the GPU where you can easily do per-pixel, true color, coloured lighting.

https://www.youtube.com/watch?v=7Fw8hZXsCxc - Same as above, but with only lighting rendered instead of normal tile graphics.

Diablo mod progress - Per-pixel lighting and hardware rendering

More Creators