|
![](/i/fill.gif) |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> How do you do a ghost or predator effect on a graphics card, like with
>> opengl or directx or something like that? I.e., as a vertex/pixel shader.
>
> I don't know the answer, but I wouldn't be surprised if the stencil buffer
> is involved (probably in conjunction with the depth buffer).
>
> The basic idea of the stencil buffer is so laughably simple that one
> would hastily think that it has no practical use. In practice people have
> developed incredible applications to the stencil buffer, including
> dynamic shadowing, planar reflections, outline drawing and portal
> rendering.
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.
--
Darren New, San Diego CA, USA (PST)
Serving Suggestion:
"Don't serve this any more. It's awful."
Post a reply to this message
|
![](/i/fill.gif) |