Realtime Fractal Renderer Documentation
hello_world.cl File Reference
#include "utils.cl"
#include "types.cl"
#include "sdf.cl"
#include "main.cl"
Include dependency graph for hello_world.cl:

Go to the source code of this file.

Macros

#define CAMERA_POSITIONS_LENGTH   1
 
#define CAMERA_POSITIONS_ARRAY   { (float4)(5, 0, 0, 0) }
 
#define CAMERA_FACING_DIRECTIONS_LENGTH   1
 
#define CAMERA_FACING_DIRECTIONS_ARRAY   { (float4)(normalise((float3)(-1, 0, 0)), 0) }
 
#define CAMERA_SPEED   2.5f
 
#define SCENE_BACKGROUND_COLOUR   (float3)(0.1f, 0.1f, 0.1f)
 
#define DO_SOFT_SHADOWS   true
 
#define MAXIMUM_MARCH_STEPS   100
 
#define MAXIMUM_MARCH_DISTANCE   50.0f
 

Functions

Light getLight (float time)
 
Material SDF (const float3 position, const float time, float *distance)
 
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, 0, 0)), 0) }

Definition at line 9 of file hello_world.cl.

◆ CAMERA_FACING_DIRECTIONS_LENGTH

#define CAMERA_FACING_DIRECTIONS_LENGTH   1

Definition at line 8 of file hello_world.cl.

◆ CAMERA_POSITIONS_ARRAY

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

Definition at line 6 of file hello_world.cl.

◆ CAMERA_POSITIONS_LENGTH

#define CAMERA_POSITIONS_LENGTH   1

Definition at line 5 of file hello_world.cl.

◆ CAMERA_SPEED

#define CAMERA_SPEED   2.5f

Definition at line 11 of file hello_world.cl.

◆ DO_SOFT_SHADOWS

#define DO_SOFT_SHADOWS   true

Definition at line 14 of file hello_world.cl.

◆ MAXIMUM_MARCH_DISTANCE

#define MAXIMUM_MARCH_DISTANCE   50.0f

Definition at line 17 of file hello_world.cl.

◆ MAXIMUM_MARCH_STEPS

#define MAXIMUM_MARCH_STEPS   100

Definition at line 16 of file hello_world.cl.

◆ SCENE_BACKGROUND_COLOUR

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

Definition at line 13 of file hello_world.cl.

Function Documentation

◆ DE()

float DE ( float3  position,
float  time 
)

Definition at line 51 of file hello_world.cl.

◆ getLight()

Light getLight ( float  time)

Definition at line 19 of file hello_world.cl.

◆ getMaterial()

Material getMaterial ( float3  position,
float  time 
)

Definition at line 45 of file hello_world.cl.

◆ SDF()

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

Definition at line 30 of file hello_world.cl.