Discussion:
[vtkusers] GLSL and vtk
Dave Semeraro
2005-10-20 20:28:46 UTC
Permalink
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
Utkarsh Ayachit
2005-10-20 21:35:55 UTC
Permalink
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.
Post by Dave Semeraro
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
http://www.vtk.org/mailman/listinfo/vtkusers
Dave Semeraro
2005-10-21 16:23:19 UTC
Permalink
Excellent,

I look forward to the document.

Dave
Post by Utkarsh Ayachit
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.
* 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.
Post by Dave Semeraro
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
http://www.vtk.org/mailman/listinfo/vtkusers
Loading...