Terrain self shadowing
Asked Answered
C

2

0

Anyone knows a painless way to do dynamic self-shadows from a directional source on a heightmap terrain? I could probably conjure something up but was wondering if there's something already in existence since people love to do terrains a lot.

Castiron answered 30/4, 2023 at 17:0 Comment(0)
G
0

You can look at the shader for steep parallax mapping or parallax occlusion mapping. They can include shadow terms generated from the depth map and should be the same math.

Gaseous answered 1/5, 2023 at 4:11 Comment(0)
C
0

Thanks. Yeah something like that would work. If I remember correctly parallax mapping uses ray marching. It could end up being costly but the similar can be achieved using precomputed horizon maps, with a bit of accuracy loss.

Strange that nobody implemented something like this already. Godot's cascading shadows systems simply falls apart when trying to do terrain shadowing. However if anyone knows a magical setting that makes it look half-decent - I'll buy them a beer 🙂

Castiron answered 1/5, 2023 at 11:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.