Original Post
Hi, All.
(EDIT: sorry, brain's asleep...I'm using FBOs under OpenGL, but it would be nice to know if this is doable under DX as well)
I'm working on a new (very fast) soft-shadowing technique, and it uses a VSM-style blur on the shadow map as an intermediate step. I was wondering if there is an efficient way to combine multiple shadow maps into one texture, so the blurring pass could be shared, saving time. Ideally my code would go something like this:
* Set up texture-1 as a RGBA16f.
* Render scene from spotlight-A into texture-1.rg
* Render scene from spotlight-B into texture-1.ba
* Blur texture-1 (probably 5-tap separable Gaussian)
* Render final scene, computing soft shadows from both spotlight-A & -B using only a single fetch from texture-1
Is this possible? I know that I could render spotlight-A's depthmap into texture-1, and spotlight-B's depthmap into texture-2, then combine both texture-1 & -2 into texture-3 before blurring, but that seems a bit of a waste.
If there was an efficient way to do this, you could even set up 4 simple depthmaps in one RGBA16f texture for distant spotlights, and render 4 shadowmaps at once (assuming they were far enough away that the non-softness wouldn't be an issue.
I really appreciate any help / pointers / advice.
thanks,
Jonathan
(btw, a tiny video showing the current state of the technique is ">here on YouTube, though I will probably have to change the name before going public [8^)
(EDIT: sorry, brain's asleep...I'm using FBOs under OpenGL, but it would be nice to know if this is doable under DX as well)
I'm working on a new (very fast) soft-shadowing technique, and it uses a VSM-style blur on the shadow map as an intermediate step. I was wondering if there is an efficient way to combine multiple shadow maps into one texture, so the blurring pass could be shared, saving time. Ideally my code would go something like this:
* Set up texture-1 as a RGBA16f.
* Render scene from spotlight-A into texture-1.rg
* Render scene from spotlight-B into texture-1.ba
* Blur texture-1 (probably 5-tap separable Gaussian)
* Render final scene, computing soft shadows from both spotlight-A & -B using only a single fetch from texture-1
Is this possible? I know that I could render spotlight-A's depthmap into texture-1, and spotlight-B's depthmap into texture-2, then combine both texture-1 & -2 into texture-3 before blurring, but that seems a bit of a waste.
If there was an efficient way to do this, you could even set up 4 simple depthmaps in one RGBA16f texture for distant spotlights, and render 4 shadowmaps at once (assuming they were far enough away that the non-softness wouldn't be an issue.
I really appreciate any help / pointers / advice.
thanks,
Jonathan
(btw, a tiny video showing the current state of the technique is ">here on YouTube, though I will probably have to change the name before going public [8^)