[Bf-committers] Adding Geometry Shaders to the BGE (patch)

Mitchell Stokes mitchell at daboys4u.com
Fri Nov 6 05:51:49 CET 2009


Hello Blender devs!

I have submitted a patch to the ge tracker to add geometry shader
support to the BGE. I'd still consider it fairly experimental at this
stage as I haven't been able to fully test it. However, here is the
link to the tracker entry:

https://projects.blender.org/tracker/index.php?func=detail&aid=19828&group_id=9&atid=306

And here is the description from the tracker:
"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)"

Here is a link to the patch:
https://projects.blender.org/tracker/download.php/9/306/19828/8955/geom_shader.patch


I'll get the Graphicall builds up soon!

Cheers,
Mitchell Stokes (Moguri)


More information about the Bf-committers mailing list