A WIP program for rendering fractals.
This project is the successor of fractal renderer.
The goal is to create another renderer that is slightly more general purpose. I plan on adding
support for meshes and texture for example. (The original fractal renderer could only render shapes defined
by an SDL).
Render passes
There are several requirements that all went into how I designed project.
To begin with, there are several different permutations which mean there
are a large number of render modes.
Render pass types
- Preview render pass: Rasterizer based renderer for editing the scene
- Raytrace render pass: A blend of raytract and raymarch to render the final image
Object types
- Mesh: Traditional collection of triangles
- SDF: Distance function for mandelblulbs and mandelboxes
- Voxel octree OPTIONAL
My first choice was to make abstract descriptions of nodes, materials,
and shapes. The preview and raytrace renderpass have specialized
collection of objects mirroring the abstract description. I made sure
to not even share things like used vulkan buffers. This allows
for further flexibility when developing in the future. Changes can
be made to either preview and raytrace seperately including
optimizations.
For example, the raytrace would benefit from having a BVH to accelerate
intersection tests. The preview render pass can also benefit from
having instanced rendering.
As an added benefit, there is a nice seperation between the scene
and vulkan.
Preview Render Pass
Meshes are straightforward to render. Everything else can be rendered as
a cube (the AABB) with some custom shaders to render either the
voxel octree or SDF. Making sure the depth buffer is properly updated
might be complicated.
Raytrace Render Pass
Everything will be based around AABB's. Once a ray intersects one,
it can run a custom intersection test on either a mesh, SDF, or another
AABB. The added benefit is that this already works as a BVH
08/03/2024
github
Gallery
Nothing here yet since I am still setting up the vulkan pipeline.