Dynamic direct sunlight


I've got the dynamic direct sunlight pass working...

P.S. Someone on Reddit pointed out, "Why do we see jumps in brightness on the roofs and not on the ground?"

It's due to both the angle of the sunlight relative to the angle of the roofs and because the rays are marched from voxel centers (not from voxel faces) by voxel units in direction of sun. Adjacent voxels easily block sunlight for a given voxel by nature of how I'm marching rays. There may be a way to fix this without a huge performance impact but I'd have to give it more thought.

Comments

Log in with itch.io to leave a comment.

(+1)

Amazing! Can't wait to see whats next.

(+1)

Thank you!

Direct sunlight definitely needs more work...  I discovered direct sunlight isn't working correctly with levels of detail (mipmaps).  I would also like to ray march light from voxel faces instead of from voxel centers for more accuracy.  Furthermore, direct sunlight doesn't take into account lighting angle of incidence between voxel face directions (normal) and sunlight direction.

Once I've addressed what can be improved with direct sunlight, I will work on cone traced global illumination.  That will both propagate sunlight indirectly as well as handle per voxel emissive lighting (and propagation of emissive lighting).

(+1)

P.S. Sunlight intensity and color also should change at sunset and sunrise.