POV-Ray : Newsgroups : povray.off-topic : scanline predator : Re: scanline predator Server Time
3 Sep 2024 17:18:26 EDT (-0400)
  Re: scanline predator  
From: Darren New
Date: 14 Oct 2010 17:50:03
Message: <4cb77b0b$1@news.povray.org>
Warp wrote:
> Darren New <dne### [at] sanrrcom> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.