[vtkusers] GLSL and vtk

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu Oct 20 17:35:55 EDT 2005


Cg/GLSL shader support has been recently added to VTK. It's still under
development. We are in the process of finalizing the API and adding
standard shaders. Also, a document will soon be made available detailing
the use of the shaders in VTK.

In the meanwhile:
* To turn the shader support on, one has to set USE_VTK_GLSL_SHADERS
and/or USE_VTK_CG_SUPPORT cmake cache variables.
* There are 2 testing scripts in Rendering/Testing/Tcl named
TestCgShader.tcl and TestGLSLShader.tcl which illustrate the use of a
shader.

Shaders in VTK are made available in form of Materials. Material
description is a xml which describes the shader(s) to use and several
uniform parameters etc. We will soon have a document describing the
detailed architecture and how to write new materials and use Cg/GLSL code.

Utkarsh.

Dave Semeraro wrote:
> 
> Hello folks,
> 
> I was browsing the Documentation for vtk 4.n today and found a few
> classes related
> to hardware shaders. I am particularly interested in the GLSL classes.
> Does anyone
> have a simple example of how the various shader related classes work in
> a vtk
> pipeline? How does one load a fragment or vertex program in and how does it
> get compiled etc. ? Does anyone have a library of useful shaders they
> would be
> willing to share?
> 
> Regards,
> Dave
> 
> 
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 




More information about the vtkusers mailing list