The uncertainty with injecting Geometry Shader in vtk

Hello all,
For the last two weeks, I have been focusing on how to set custom Geometry Shader Code to any simple vtk mapper with actors. In the case of Fragment Shader and Vertex Shader, this task of injecting code was relatively easier and has been well explored by me. Now shifting our focus to Geometry Shaders, we encountered a few abnormal behaviours.

From the documentation and source code of vtk, it is very clear that the library supports custom Geometry Shader along with a few other custom shaders available.  The default Geometry Shaders for WideLines works very well. The existing example in dipy docs with and without geometry shaders is attached. The difference can be clearly observed in this case.

For the task of replicating the shader, I used the method ‘SetReplacementShaderCode’ to set the same code given in WideLines. It is somehow not working well. The same was also observed by David and we are currently approaching the vtk mailing list to get more insight into the problem we are facing now.

The current working of the normal renderer and the one with WideLines enabled are shown below.


Line with WideLines GS disabled.

Line with WideLine GS enabled.

We are hoping to find the solution to this issue and hopefully help vtk with a few working examples of the same.

thechargedneutron

Leave a Reply

Your email address will not be published. Required fields are marked *