[vtkusers] vtkGPUVolumeRayCastMapper where can i find the code of fragment shader

David E DeMarle dave.demarle at kitware.com
Thu Jun 14 07:58:52 EDT 2012


Looks like the core of
VTK/Rendering/VolumeOpenGL/vtkOpenGLGPUVolumeRayCastMapper.cxx
starts at line 4994:
  this->PreRender(ren,vol,bounds,range,numberOfScalarComponents,1);
  if(this->LoadExtensionsSucceeded)
    {
    this->RenderBlock(ren,vol,0);
    this->PostRender(ren,numberOfScalarComponents);
    }

Underneath RenderBlock it eventually calls:
          this->Program->SendUniforms();
          abort=this->RenderClippedBoundingBox(1,i,count,ren->GetRenderWindow());
          if (!abort)
            {
            this->CopyFBOToTexture();
            }
Which looks to me to be where the glsl shader programs (this->Program)
receive, process and return the results of the volume rendering. You
can find the shader program source code in the same directory at that
file.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Tue, Jun 12, 2012 at 10:06 PM, qlizhi <qlizhi at gmail.com> wrote:
> hi, all:
>       the description  about class vtkGPUVolumeRayCastMapper was:
> Ray casting performed on the GPU. vtkGPUVolumeRayCastMapper is a volume
> mapper that performs ray casting on the GPU using fragment programs.
>
>
>
> Can anybody tell me where can i find the ray-casting algorithm about
> fragment shader. I donnot know the procedures on
> vtkGPUVolumeRayCastMapper  , so it would be best that you can explane it
> .Thanks a lot!
>
>
> ________________________________
> qlizhi
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list