Hello all!
I’ve submitted a patch that adds geometry shader support to the BGE. Here is the description from the patch:
Here is a patch to add geometry shaders to the BGE. Here is a wikipedia link on geometry shaders:
http://en.wikipedia.org/wiki/Geometry_shader
This patch requires GLEW to be updated like in this patch:
https://projects.blender.org/tracker/index.php?func=detail&aid=19796&group_id=9&atid=127
I’ll be making a build for Graphicall for people to test to make sure the geometry shaders are working correctly. My
quick tests (a pass-through and swizzling the x and y of the inputs) worked, but I’m not that great with GLSL.
Also, there are some api changes for this new feature:
BL_Shader.setGeometryInputType(type)
BL_Shader.setGeometryOutputType(type)
These change the input and output types of the geometry shader and I think they should be placed before the call to
BL_Shader.setSources(). Also, I’ve added some constants to GameLogic for these.
Also, I’ve added an optional parameter on the end of BL_Shader.setSources() for the geometry shader. This, however makes
it look kind of odd:
BL_Shader.setSources(vertProg, fragProg, apply, geomProg=None)
And here is a link to a Windows build:
And here is a Blend file with a very simple geometry shader:
Attachments
geom.blend (76.5 KB)