Realtime Fractal Renderer Documentation
mandelbulb.cl File Reference
#include "utils.cl"
#include "types.cl"
#include "sdf.cl"
#include "main.cl"
Include dependency graph for mandelbulb.cl:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CAMERA_POSITIONS_LENGTH   1
 
#define CAMERA_POSITIONS_ARRAY   { (float4)(2, 0, 0, 0) }
 
#define CAMERA_FACING_DIRECTIONS_LENGTH   1
 
#define CAMERA_FACING_DIRECTIONS_ARRAY   { (float4)(normalise((float3)(1, 1, 1)), 0) }
 
#define FORCE_FREE_CAMERA   true
 
#define DO_GEOMETRY_GLOW   true
 
#define DO_SOFT_SHADOWS   true
 
#define DO_HARD_SHADOWS   false
 
#define USE_BOUNDING_VOLUME   true
 
#define DO_RENDER_SURFACE_NORMALS   false
 
#define DO_RENDER_MARCHING_ITERATIONS   false
 
#define DISPLAY_BOUNDING_VOLUME   false
 
#define OVERRIDE   false
 
#define MAXIMUM_MARCH_STEPS   150
 
#define MAXIMUM_MARCH_DISTANCE   50.0f
 
#define SURFACE_INTERSECTION_EPSILON   0.001f
 
#define SCENE_GLOW_COLOUR   (float3)(0.8f, 0.8f, 0.8f)
 
#define SCENE_MAX_GLOW_DISTANCE   0.05f
 
#define SCENE_BACKGROUND_COLOUR   (float3)(0.1f, 0.1f, 0.1f)
 
#define CAMERA_SPEED   0.5f
 
#define SURFACE_SHADOW_EPSILON   0.01f
 
#define SURFACE_SHADOW_FALLOFF   10.0f
 
#define ITERATIONS   10
 

Functions

Light getLight (float time)
 
Material mandelbulbSDF (const float3 position, const float time, float *distance)
 
float boundingVolumeDE (float3 position, float time)
 
Material getMaterial (float3 position, float time)
 
float DE (float3 position, float time)
 

Macro Definition Documentation

◆ CAMERA_FACING_DIRECTIONS_ARRAY

#define CAMERA_FACING_DIRECTIONS_ARRAY   { (float4)(normalise((float3)(1, 1, 1)), 0) }

Definition at line 7 of file mandelbulb.cl.

◆ CAMERA_FACING_DIRECTIONS_LENGTH

#define CAMERA_FACING_DIRECTIONS_LENGTH   1

Definition at line 6 of file mandelbulb.cl.

◆ CAMERA_POSITIONS_ARRAY

#define CAMERA_POSITIONS_ARRAY   { (float4)(2, 0, 0, 0) }

Definition at line 5 of file mandelbulb.cl.

◆ CAMERA_POSITIONS_LENGTH

#define CAMERA_POSITIONS_LENGTH   1

Definition at line 4 of file mandelbulb.cl.

◆ CAMERA_SPEED

#define CAMERA_SPEED   0.5f

Definition at line 37 of file mandelbulb.cl.

◆ DISPLAY_BOUNDING_VOLUME

#define DISPLAY_BOUNDING_VOLUME   false

Definition at line 22 of file mandelbulb.cl.

◆ DO_GEOMETRY_GLOW

#define DO_GEOMETRY_GLOW   true

Definition at line 11 of file mandelbulb.cl.

◆ DO_HARD_SHADOWS

#define DO_HARD_SHADOWS   false

Definition at line 13 of file mandelbulb.cl.

◆ DO_RENDER_MARCHING_ITERATIONS

#define DO_RENDER_MARCHING_ITERATIONS   false

Definition at line 21 of file mandelbulb.cl.

◆ DO_RENDER_SURFACE_NORMALS

#define DO_RENDER_SURFACE_NORMALS   false

Definition at line 20 of file mandelbulb.cl.

◆ DO_SOFT_SHADOWS

#define DO_SOFT_SHADOWS   true

Definition at line 12 of file mandelbulb.cl.

◆ FORCE_FREE_CAMERA

#define FORCE_FREE_CAMERA   true

Definition at line 8 of file mandelbulb.cl.

◆ ITERATIONS

#define ITERATIONS   10

Definition at line 42 of file mandelbulb.cl.

◆ MAXIMUM_MARCH_DISTANCE

#define MAXIMUM_MARCH_DISTANCE   50.0f

Definition at line 32 of file mandelbulb.cl.

◆ MAXIMUM_MARCH_STEPS

#define MAXIMUM_MARCH_STEPS   150

Definition at line 31 of file mandelbulb.cl.

◆ OVERRIDE

#define OVERRIDE   false

Definition at line 27 of file mandelbulb.cl.

◆ SCENE_BACKGROUND_COLOUR

#define SCENE_BACKGROUND_COLOUR   (float3)(0.1f, 0.1f, 0.1f)

Definition at line 36 of file mandelbulb.cl.

◆ SCENE_GLOW_COLOUR

#define SCENE_GLOW_COLOUR   (float3)(0.8f, 0.8f, 0.8f)

Definition at line 34 of file mandelbulb.cl.

◆ SCENE_MAX_GLOW_DISTANCE

#define SCENE_MAX_GLOW_DISTANCE   0.05f

Definition at line 35 of file mandelbulb.cl.

◆ SURFACE_INTERSECTION_EPSILON

#define SURFACE_INTERSECTION_EPSILON   0.001f

Definition at line 33 of file mandelbulb.cl.

◆ SURFACE_SHADOW_EPSILON

#define SURFACE_SHADOW_EPSILON   0.01f

Definition at line 38 of file mandelbulb.cl.

◆ SURFACE_SHADOW_FALLOFF

#define SURFACE_SHADOW_FALLOFF   10.0f

Definition at line 39 of file mandelbulb.cl.

◆ USE_BOUNDING_VOLUME

#define USE_BOUNDING_VOLUME   true

Definition at line 16 of file mandelbulb.cl.

Function Documentation

◆ boundingVolumeDE()

float boundingVolumeDE ( float3  position,
float  time 
)

Definition at line 103 of file mandelbulb.cl.

◆ DE()

float DE ( float3  position,
float  time 
)

Definition at line 118 of file mandelbulb.cl.

◆ getLight()

Light getLight ( float  time)

Definition at line 51 of file mandelbulb.cl.

◆ getMaterial()

Material getMaterial ( float3  position,
float  time 
)

Definition at line 110 of file mandelbulb.cl.

◆ mandelbulbSDF()

Material mandelbulbSDF ( const float3  position,
const float  time,
float *  distance 
)

Definition at line 64 of file mandelbulb.cl.