kvark / vange-rs

Rusty Vangers clone
https://vange.rs
Apache License 2.0
428 stars 21 forks source link

Let objects cast shadows on the terrain #96

Closed kvark closed 4 years ago

kvark commented 4 years ago

I think what we want in the end is the shadows to be completely separate off the terrain. Instead of doing a ray cast for each terrain point to see if it's shadowed, we need a whole raytracing pass that writes into the depth buffer of the light, so that it can be mixed with the car shadows and applied equally to both cars and terrain.