I’m following this paper in order to implement PCSS in my engine.
I have a little problem though. My engine only permits omnidirectial lights up to now – I’ll add more later, but that’s not the question. So, in the first place, I implemented hard shadow mapping. It was a win.
I decided to turn my hard shadows into soft ones via PCSS. As a careful person, I decided to make a first shot at PCF to get my feet wet. And that’s a fail.
On a 2D texture, it’s pretty straight-forward. I just sample several values from the light depthmap using a simple kernel, and I average them with a box / poisson / gaussian / whatever filter.
But how should I do that in a cubemap?! The offsets are directions, I don’t really know how to do that…