How to Emulate a Stack and Recursive Functions in a DirectX 10 Shader

Recursion in Direct3D shader



Humus has released a new tech demo but this time there is no catch-eye effect: the demo shows how to implement a recursive function in a Direct3D 10 shader (in the geometry shader) in order to tesselate a mesh sphere. DX10 shader does not support recursive functions and to emulate this feature, Humus has used a while loop and some stack control variables. You can grab the demo HERE.



Related posts:

  1. Shader Maker
  2. OpenGL demos taking advantage of Shader Model 4
  3. New Features of DirectX 11 Explaned
  4. Interior mapping Direct3D 10.1 Demo
  5. Deferred Shading Demo with Direct3D 10.1