[vtkusers] Applying post-processing shader
David E DeMarle
dave.demarle at kitware.com
Fri Mar 6 13:29:52 EST 2015
You could do the window2image (external) route. Something like
render to back buffer
grab rgb(z?) from window
apply your operation to pixels
replace back buffer
swap
could work.
I think that the multi pass rendering framework (internal) route though
will probably be better though once you wrap your head around it. For
details see:
http://www.vtk.org/Wiki/VTK/MultiPass_Rendering
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Thu, Mar 5, 2015 at 1:52 PM, WeltMarco <godimarcovr at gmail.com> wrote:
> Hi all,
> i'm currently working on a project in which i need to apply a
> post-processing shader to a rendered scene (in particular it is a barrel
> distortion shader).
>
> The problem is, by applying the shader on the actor's vtkProperty i can
> only
> intervene on the actor's model (for example a shader that paints everything
> red, will only make the actor red) but i need it to intervene on the scene
> already rendered (so if i apply the same red shader, it will turn
> everything
> red).
>
> I was thinking of extracting an Actor2D by going through the WindowToImage
> filter, but there is nothing about shaders on the vtkProperty2D.
> Is there a way to do this in VTK?
>
> Thank you in advance for your help
> Marco
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Applying-post-processing-shader-tp5730683.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150306/454be3ae/attachment.html>
More information about the vtkusers
mailing list