GLSL implementation of screen space global illumination as a GLSL TOP for TouchDesigner. The shader basically samples a grid of points that it treats as light sources. The colours for the light sources are based on the colour buffer at the light locations. Each light is then averaged out and blended with the current pixel value thus faking some sort of global illumination. You can check out a (very simple) online demo here
Just drop down a GLSL TOP and copy/paste the shader. The shader requires 4 parameters
uInvProjMatrix
is the inverse of the camera projection matrix, thegetInvProjScript
Execute DAT in the .toe has an example on how to get the matrix and send it to the GLSL TOPuGIAmount
is the amount of GI to blend in the direct lightinguKernelSize
is the size of the kernel to sample lighting information from- A depth map from te Render TOP, check out interactiveimmersive.io or docs.derivative.ca/Depth_TOP for more information on how to set it up.
Martins Upitis and Wicked Engine both provide good source/explanations about how to rebuild the normals from the depth map.
If you see anything that could be improved please feel free to share.