Raymarcher is a part of Unity's default rendering pipeline, contingent on the targeted Unity renderer pipeline (UPR/HDRP/BuiltIn).
However, Raymarcher expands the pipeline with additional steps necessary to deliver the final frame properly processed by the Raymarcher to the screen.
Raymarcher is compatible with all rendering paths (forward, deferred, forward+).
When using VR, Raymarcher is compatible with
Multi-pass rendering mode exclusively.
The Raymarcher rendering pipeline is categorized into three major stages:
1. Data Retrieval Stage
2. Shader Stage
3. Final Delivery StageDuring the
data retrieval stage, Raymarcher gathers all the required data from the registered SDF (Signed Distance Function) objects, scene lights, and registered material instances.
All of this data is transferred to the Render Master, which converts these data into buffers or individual arrays (depending on the platform).
At the
shader stage, when all the data is transported from the CPU to the GPU, the vertex stage in the shader is processed.
The fragment stage branches into Raymarcher's core loop. This loop continues to the calculation of the buffer called
SdfObjectBuffer.
This buffer handles all the registered Raymarcher objects, SDF formulas, etc.
Another special buffer processed is called
MaterialBuffer, which is divided into per-object/instance and global versions, both in post/pre versions.
Once all the Raymarcher data is calculated on the GPU's side, the
shader finalizer takes place, and it outputs its data into the camera filter (which differs depending on Unity's RP).
Finally, the output frame is displayed on the virtual quad on specific cameras in the scene.
Raymarcher doesn't output any temporary textures containing final Raymarcher calculations. There is no output color texture, shadow texture, or a depth/+normals texture.
This means that regular meshes will not receive shadows from Raymarcher objects, and vice versa.
The same holds true for depth-based post-processing effects, as there is no depth pass for Raymarcher.
This is still under development, and I plan to implement such features into Raymarcher in the future.