[vtk-developers] [EXTERNAL] Re: VTK OpenGL2 Shaders
Ken Martin
ken.martin at kitware.com
Wed Feb 17 15:19:28 EST 2016
I took a quick stab at updating the first wiki link.
Thanks!
Ken
On Fri, Feb 5, 2016 at 3:16 PM, Gerrick Bivins <
Gerrick.Bivins at halliburton.com> wrote:
> So are these not valid anymore?
>
> http://www.vtk.org/Wiki/Shader_In_VTK
>
> *http://www.vtk.org/Wiki/images/3/39/Vtk_shaders_tudelft_tut.pdf
> <http://www.vtk.org/Wiki/images/3/39/Vtk_shaders_tudelft_tut.pdf>*
>
>
>
> Or am I misunderstanding the question?
>
> Gerrick
>
>
>
> *From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On Behalf
> Of *Ken Martin
> *Sent:* Friday, February 05, 2016 12:21 PM
> *To:* Aashish Chaudhary
> *Cc:* VTK Developers; Steve Pieper
> *Subject:* [EXTERNAL] Re: [vtk-developers] VTK OpenGL2 Shaders
>
>
>
> Here is some info from an old email on customizing the polydatamapper
> shaders. The PointGaussianMapper also supports custom shaders and there is
> an example of that in
> Rendering/OpenGL2/Testing/Cxx/TestPointGaussianMapperOpacity.cxx
>
> Thanks
>
> Ken
>
>
>
> 2) *CUSTOM SHADERS* - Added support for customizing the default
> PolyDataMapper shaders. You can now modify or completely replace the
> default VTK shadersusing methods such as
>
>
>
> AddShaderReplacement: replaces a strings in the current shader
> SetVertexShaderCode: replaces the default shader template with your own
>
> AddObserver(vtkCommand::UpdateShaderEvent,...)
>
>
>
> These methods (and similar others) give you a great degree on control of
> the VTK PolyData shaders. There are examples/tests in
> Rendering/OpenGL2/Testing/Cxx/TestUserShader.cxx and TestUserShader2.cxx.
> Through the UpdateShaderEvent you can modify the default VTK uniforms or
> your own uniforms as desired. There is currently not a general purpose easy
> API for binding your own data arrays to attributes but we may add one at
> some point in the future. Currently VTK will send down the default
> attributes for you to use in your shader (position, normal, tcoords,
> colors, etc)
>
>
>
>
>
> On Fri, Feb 5, 2016 at 12:11 PM, Aashish Chaudhary <
> aashish.chaudhary at kitware.com> wrote:
>
> Not to my knowledge. Although we talked about it at-least having an API so
> that folks can replace the shader or ember new shader code to the existing
> one. Also, having some common convention would be nice.
>
>
>
> Thanks,
>
>
>
>
>
>
>
>
>
> On Fri, Feb 5, 2016 at 11:31 AM, Steve Pieper <pieper at isomics.com> wrote:
>
> Hi Bill -
>
>
>
> Great question - I'm looking forward to hear what folks have been doing in
> this respect.
>
>
>
> For me, I have two classes I have been testing with Slicer - one that
> manages 3D textures and one that implements shaders [1,2]. We worked on it
> at project week [3] and I'm liking how it works.
>
>
>
> -Steve
>
>
>
> [1]
> https://github.com/pieper/CommonGL/blob/master/ShadedActor/Logic/vtkOpenGLTextureImage.h
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_pieper_CommonGL_blob_master_ShadedActor_Logic_vtkOpenGLTextureImage.h&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=JLVNzBHTy2yDiWAhQ0jnM62_2X-JALDcuHvl4RY9ZpY&e=>
>
>
>
> [2]
> https://github.com/pieper/CommonGL/blob/master/ShadedActor/Logic/vtkOpenGLShaderComputation.h
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_pieper_CommonGL_blob_master_ShadedActor_Logic_vtkOpenGLShaderComputation.h&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=Upj6sEV1BITP7GV9N2UGJNJM64zB3ZL_YaisWo-g7-0&e=>
>
>
>
> [3]
> http://www.na-mic.org/Wiki/index.php/2016_Winter_Project_Week/Projects/CommonGL
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.na-2Dmic.org_Wiki_index.php_2016-5FWinter-5FProject-5FWeek_Projects_CommonGL&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=-oFwTMNXYMuPGDDU4QWUesSB464T4cUMyOE2_7fiYTk&e=>
>
>
>
> On Fri, Feb 5, 2016 at 11:10 AM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>
> Folks,
>
> Is there documentation on how to write glsl shaders for VTK?
>
> Bill
> --
> Unpaid intern in BillsBasement at noware dot com
> _______________________________________________
> Powered by www.kitware.com
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=Ov3UXUt9EbFHF6exobtHjeAMwopRx6Q8Ml-eP8N9jOg&e=>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=JwTfptIFeIgiB38cuIHFDKpknvOFhK46OJWaOs4AgVY&e=>
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtk-2Ddevelopers&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=dEi2gXi3oLcl7qTf-dfO5g5VFdamU6el6anpwWupNSA&e=>
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_vtk-2Ddevelopers&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=n3WrRWDvXW4V8Cfch8-qv38ZzO-JbMpk5ZC5oqPwKYk&e=>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=Ov3UXUt9EbFHF6exobtHjeAMwopRx6Q8Ml-eP8N9jOg&e=>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=JwTfptIFeIgiB38cuIHFDKpknvOFhK46OJWaOs4AgVY&e=>
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtk-2Ddevelopers&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=dEi2gXi3oLcl7qTf-dfO5g5VFdamU6el6anpwWupNSA&e=>
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_vtk-2Ddevelopers&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=n3WrRWDvXW4V8Cfch8-qv38ZzO-JbMpk5ZC5oqPwKYk&e=>
>
>
>
>
>
> --
>
>
>
> *| Aashish Chaudhary | Technical Leader | Kitware Inc.
> *
>
> *| http://www.kitware.com/company/team/chaudhary.html
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_company_team_chaudhary.html&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=RYxdu_hFWqBEji7llxapa6LTZ_5rrmqWFA4eE9XA-as&e=>*
>
>
> _______________________________________________
> Powered by www.kitware.com
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=Ov3UXUt9EbFHF6exobtHjeAMwopRx6Q8Ml-eP8N9jOg&e=>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=JwTfptIFeIgiB38cuIHFDKpknvOFhK46OJWaOs4AgVY&e=>
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtk-2Ddevelopers&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=dEi2gXi3oLcl7qTf-dfO5g5VFdamU6el6anpwWupNSA&e=>
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_vtk-2Ddevelopers&d=CwMFaQ&c=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo&r=dYPoPShFc1EqLn33Mo4Py4WqeXt1iYFFH8LtrXQrL0g&m=XoFNZ9OxJwMjdGGPJ5fjbJWBncB9E_q-Rw9Vhuk3Tcc&s=n3WrRWDvXW4V8Cfch8-qv38ZzO-JbMpk5ZC5oqPwKYk&e=>
>
>
>
>
>
> --
>
> Ken Martin PhD
>
> Chairman & CFO
> Kitware Inc.
> 28 Corporate Drive
> Clifton Park NY 12065
> 518 371 3971
>
>
>
> This communication, including all attachments, contains confidential and
> legally privileged information, and it is intended only for the use of the
> addressee. Access to this email by anyone else is unauthorized. If you are
> not the intended recipient, any disclosure, copying, distribution or any
> action taken in reliance on it is prohibited and may be unlawful. If you
> received this communication in error please notify us immediately and
> destroy the original message. Thank you.
>
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee. Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160217/50841a7c/attachment-0001.html>
More information about the vtk-developers
mailing list