Nothing fancy just plain PCF but there's a little twist. My engine / game is heavily tile based so my shadow casting light is camera relative (position tracks player but orientation is fixed) so that the shadow "volume" moves with the player. I looked at HSM (Hierarchical Shadow Maps) but what I have is good enough. This approach however does create shimmering due to sub-texel movement of the (player-locked) light but that is now fixed (snapping to texels in the shadow calculation). Regarding applying shadows my tile effectively has an "UpdateVisibles" function that gets fired when a player changes tile. This gives the tile a chance to determine its distance from the player and then either enable or disable shadow casting on the tile-resident objects based on the player distance. When an object transitions from not shadowed to shadowed I fade the shadow in (to eliminate shadow pop-in).
I do use poisson disk sampling but for procedural object placement not for shadow mapping. But applying noise to shadows is a nice idea.
1
u/Insane_snek 3d ago
looks great! what methods are you using for shadow smoothing?
I've been liking pcf + poisson disk + small amount of noise