Skip to content
This repository has been archived by the owner on Jun 12, 2022. It is now read-only.

Render engine which uses ray marching to render 3D fractals composed of folded primitives. Implemented using HLSL compute shaders through Unity3D.

Notifications You must be signed in to change notification settings

akoreman/Compute-Shader-Fractal-Ray-Marching

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compute Shader Ray Marching

Render engine to use ray marching to render, in real-time, 3D fractals composed of (conformally) transformed primitives. Implemented using HLSL compute shaders through Unity3D. Unity is used to render the final image to screen and to handle user input. Inspired by http://blog.hvidtfeldts.net/index.php/2011/06/distance-estimated-3d-fractals-part-i/ .

When opening the UnityProject folder in Unity3D add the script (in the assets folder) 'Scripts/RayMarcher.cs' to the main camera.

Currently Implemented:

  • First-person movement through the fractals.
  • Unlit shading.
  • Lit shading by approximating normal vectors by using central difference.
  • Directional shadows by retracing from the point where a camera ray hits the geometry to the light source.
  • Surface glow implemented by visualising how close non-hitting rays get to the geometry.
  • Coarse ambient occlusion by using the number of marching steps as an analogue for the complexity of the geometry.
  • Position based coloring.
  • Color based visualisation of rendering complexity for each pixel by keeping track how many marches are required to terminate.

Screenshots

About

Render engine which uses ray marching to render 3D fractals composed of folded primitives. Implemented using HLSL compute shaders through Unity3D.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published