Hello, I’ve tried to port the code of “Rasterized Voxel-based Dynamic Global Illumination” by Hawar Doghramachi:
It is only a port, all credits to the original author.
It is DirectX11 only, you can find it here:
The main code is here: .\Source\Work\WorkTests\SampleRVGI.cpp
The render path (Data/RVGI/RenderPaths/RVGI.xml) has a brief explanation of what it is doing.
It is still incomplete, has only one voxel grid (two in the original code) and there are some problems: random flickering (this can be solved with a temporal filter), light bleeding through walls, pixellated look… the original sample looks better.
It is so so, but what was implemented to make it work maybe can be useful (DirectX11 only):
geometry shaders, compute shaders, structured buffers (called ShaderBuffer) for reading (StructuredBuffer) and writing (RWStructuredBuffer) from compute and pixel shaders, compute command for the render path, manual unbinding of graphic resources (SRV, UAV, RT) (very useful), texture arrays as output (render targets) for pixel and compute shaders, null triangle command (this is similar to the quad command but can be instanced, it is useful to write to texture arrays), option to disable the stencil view (again, useful for writing to texture arrays), option to set a per-pass cull mode, per-command shaders parameters for scene pass commands, jumps and repetitions in the render path.
I’ve added some examples, they are in the same directory, see the selector in main.cpp.
Video: webmshare.com/ww16j (does not represent the quality of the original work)