taby said:
Do you have a favourite code?
No, but i remember Frictional Games being proud on their robust implementation, so maybe that's one more resource to look up: https://github.com/FrictionalGames/HPL1Engine
taby said:
Or do you recommend shadow maps, for beginners like me when it comes to shadows?
Well, anybody has switched to SM, even gfx seniors : )
So why do you consider volumes at all? Do you need pixel perfect shadows?
If so, there is another alternative:
Per SM, for each texel store a list of intersecting triangles (using conservative rasterization).
Then at the shadow lookup you can loop over all triangle and intersect with the ray.
This technique is probably better for detailed geometry, while volumes work better for low poly meshes, but not sure.
NV made it a game works effect, and it has been used for some games, e.g. The Division 2. It's practical for only one light source (son), they say. Related search terms are ‘irregular Z-Buffer’, IIRC.
That said, we are at the dawn of ray traced shadows, so personally i would recommend: Do not waste time on the SM rabbit hole, implement only a simple SM technique, wait some years until everybody has RT GPU, replace with raytraced shadows.
But other people are still into SM, and there's still active research.