|
![](/i/fill.gif) |
> Ah! Ok, now that you mention it, I suppose I could render the ghosts with
> a shader that puts 1's in the stencil buffer and 0's everywhere else, and
> then use the result to do the post-process step. I never really saw an
> example of using the stencil buffer, but now that you mention it, it's
> entirely likely that's exactly what it was intended for. I'll have to
> study up how you can get a shader to write to it.
The problem is reading from it, AFAIK you can't read from the stencil buffer
in a pixel shader on most hardware, all you can do is tell the GPU to run
your shader or not, depending on certain criteria of the stencil buffer.
Post a reply to this message
|
![](/i/fill.gif) |