1

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…

phaazon
  • 1,972
  • 15
  • 21
  • Did you end up getting this? I'm having the same issue now. I'm using a cubemap, but can't work out how to use a large PCF kernel. – Jagoly Apr 16 '15 at 10:45

1 Answers1

0

Using a cubemap, your UV coords are a direction. It's pretty easy to get the light depthmap UV's from that. Sample as if the direction is coming from the light source.

Gabriel Reiser
  • 402
  • 5
  • 10