New Javascript Raycasting Engine #7 - Dynamic lighting, particle effects, transparent textures

preview_player
Показать описание

Play with the raycast editor here:
Рекомендации по теме
Комментарии
Автор

Imagine if we had browser games like this in the 2000s 😩

ooze
Автор

Can the dynamic light cast shadows or is it basically just light blobs slapped onto the ground? Considering it's already a raycast engine it would make sense for each wall and floor pixel to sample the surrounding light sources by casting a ray to them to see if they are within line of sight of it and if so get lit based on the color and distance (ideally using inverse square falloff but linear is fine considering it's javascript so obviously not that fast), this would only do direct illumination of course but I mean you could probably fake bounce lighting while avoiding doing actual bounces with a cheap approximation if you keep track of which wall and floor pixels are illuminated in an off screen buffer and you brighten up the surrounding area a bit based on that information, like I said not super accurate but cheap since you don't have to cast any extra rays

jlewwis