# Geometry Shader Implementation

**URL:** https://discourse.vtk.org/t/geometry-shader-implementation/1189
**Category:** Support
**Created:** [June 21, 2019, 8:42am UTC](https://discourse.vtk.org/t/geometry-shader-implementation/1189 "2019-06-21T08:42:11Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![dmreagan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dmreagan/32/7489_2.png) [@dmreagan](https://discourse.vtk.org/u/dmreagan)
#### Post date: [July 1, 2019, 5:01pm UTC](https://discourse.vtk.org/t/geometry-shader-implementation/1189/3 "2019-07-01T17:01:43Z")

</div>

I found that `AddShaderReplacement` didn’t work from Python for geometry shaders, so I have used [vtkOpenGLPolyDataMapper::SetGeometryShaderCode](https://vtk.org/doc/nightly/html/classvtkOpenGLPolyDataMapper.html#acce2e848fee2cd1d0513c75076702893).

You can see a simple example [here](https://github.com/dmreagan/fury-shaders/blob/master/geometry.py) that takes in a cube and replaces each vertex with a pyramid. The example uses the [FURY](http://fury.gl/) library, but the shader part is raw VTK.

---

_[View the full topic](https://discourse.vtk.org/t/geometry-shader-implementation/1189)._
