Can someone please guide me on how to inject Geometry Shader Code?
Hi,
In VTK 8: vtkOpenGLPolyDataMapper::AddShaderReplacement
In VTK 9 (and current master): vtkShaderProperty::AddGeometryShaderReplacement
1 Like
I found that AddShaderReplacement
didn’t work from Python for geometry shaders, so I have used vtkOpenGLPolyDataMapper::SetGeometryShaderCode.
You can see a simple example here that takes in a cube and replaces each vertex with a pyramid. The example uses the FURY library, but the shader part is raw VTK.
1 Like