Realtime Fractal Renderer Documentation
defines.cl
Go to the documentation of this file.
1#ifndef DEFINES_CL
3#define DEFINES_CL
5
6// Optimisations
7
8#ifndef INCREASE_INTERSECTION_EPSILON_LINEARLY
11#define INCREASE_INTERSECTION_EPSILON_LINEARLY true
12#endif
13
14#ifndef USE_BOUNDING_VOLUME
17#define USE_BOUNDING_VOLUME false
18#endif
19
20// Features
21
22#ifndef DO_AMBIENT_LIGHTING
25#define DO_AMBIENT_LIGHTING true
26#endif
27
28#ifndef DO_DIFFUSE_LIGHTING
31#define DO_DIFFUSE_LIGHTING true
32#endif
33
34#ifndef DO_SPECULAR_HIGHLIGHTS
37#define DO_SPECULAR_HIGHLIGHTS true
38#endif
39
40#ifndef DO_GEOMETRY_GLOW
43#define DO_GEOMETRY_GLOW false
44#endif
45
46#ifndef DO_SOFT_SHADOWS
49#define DO_SOFT_SHADOWS false
50#endif
51
52#ifndef DO_HARD_SHADOWS
55#define DO_HARD_SHADOWS false
56#endif
57
58#if DO_SOFT_SHADOWS && DO_HARD_SHADOWS
59#error "DO_SOFT_SHADOWS and DO_HARD_SHADOWS cannot be used at the same time"
60#endif
61
62#ifndef DO_GAMMA_CORRECTION
65#define DO_GAMMA_CORRECTION false
66#endif
67
68// Debug
69
70#ifndef DO_RENDER_SURFACE_NORMALS
73#define DO_RENDER_SURFACE_NORMALS false
74#endif
75
76#ifndef DO_RENDER_MARCHING_ITERATIONS
79#define DO_RENDER_MARCHING_ITERATIONS false
80#endif
81
82#ifndef DISPLAY_BOUNDING_VOLUME
85#define DISPLAY_BOUNDING_VOLUME false
86#endif
87
88#ifndef BOUNDING_VOLUME_COLOUR
91#define BOUNDING_VOLUME_COLOUR (float3)(0.4f, 0.1f, 0.1f)
92#endif
93
94#if DISPLAY_BOUNDING_VOLUME && ! USE_BOUNDING_VOLUME
95#error "Cannot display bounding volumes when they are not enabled"
96#endif
97
98// Camera configuration
99
100#ifndef CAMERA_VERTICAL_FOV_DEGREES
103#define CAMERA_VERTICAL_FOV_DEGREES 40.0f
104#endif
105
106#ifndef CAMERA_FOCUS_DISTANCE
109#define CAMERA_FOCUS_DISTANCE 0.1f
110#endif
111
112#ifndef CAMERA_UP_AXIS
115#define CAMERA_UP_AXIS (float3)(0, 1, 0)
116#endif
117
118#ifndef CAMERA_SPEED
121#define CAMERA_SPEED 5.0f
122#endif
123
124#ifndef CAMERA_DO_LOOP
128#define CAMERA_DO_LOOP false
129#endif
130
131// Throw compile time errors if these values have not been defined
132// Define the macros so that Doxygen can see them, though these values will never be used
133
134#ifndef CAMERA_POSITIONS_ARRAY
135#error "CAMERA_POSITIONS_ARRAY must be defined"
150#define CAMERA_POSITIONS_ARRAY { (float4)(0, 0, 0, 0) }
151#endif
152
153#ifndef CAMERA_FACING_DIRECTIONS_ARRAY
154#error "CAMERA_FACING_DIRECTIONS_ARRAY must be defined"
169#define CAMERA_FACING_DIRECTIONS_ARRAY { (float4)(normalise((float3)(1, 1, 1)), 0.0f) }
170#endif
171
172#ifndef CAMERA_POSITIONS_LENGTH
173#error "CAMERA_POSITIONS_LENGTH must be defined"
176#define CAMERA_POSITIONS_LENGTH 1
177#endif
178
179#ifndef CAMERA_FACING_DIRECTIONS_LENGTH
180#error "CAMERA_FACING_DIRECTIONS_LENGTH must be defined"
183#define CAMERA_FACING_DIRECTIONS_LENGTH 1
184#endif
185
186#ifndef FORCE_FREE_CAMERA
189#define FORCE_FREE_CAMERA false
190#endif
191
192// Scene configuration
193
194#define BENCHMARK_START_STOP_TIME_DONT_DO_TIMED (float2)(-1, -1)
195
196#ifndef BENCHMARK_START_STOP_TIME
200#define BENCHMARK_START_STOP_TIME BENCHMARK_START_STOP_TIME_DONT_DO_TIMED
201#endif
202
203#ifndef SCENE_GLOW_COLOUR
206#define SCENE_GLOW_COLOUR (float3)(1)
207#endif
208
209#ifndef SCENE_MAX_GLOW_DISTANCE
212#define SCENE_MAX_GLOW_DISTANCE 10.0f
213#endif
214
217#ifndef SCENE_BACKGROUND_COLOUR
218#define SCENE_BACKGROUND_COLOUR (float3)(0)
219#endif
220
221// Other configuration
222
225#ifndef FLOAT_MAX_VALUE
226#define FLOAT_MAX_VALUE 3e38
227#endif
228
229#ifndef MAXIMUM_MARCH_STEPS
232#define MAXIMUM_MARCH_STEPS 100
233#endif
234
235#ifndef MAXIMUM_MARCH_DISTANCE
238#define MAXIMUM_MARCH_DISTANCE 1000.0f
239#endif
240
241#ifndef SURFACE_INTERSECTION_EPSILON
244#define SURFACE_INTERSECTION_EPSILON 0.001f
245#endif
246
247#ifndef LINEAR_INTERSECTION_EPSILON_MULTIPLIER
250#define LINEAR_INTERSECTION_EPSILON_MULTIPLIER 0.75f
251#endif
252
253#ifndef SURFACE_NORMAL_EPSILON
256#define SURFACE_NORMAL_EPSILON 0.001f
257#endif
258
259#ifndef BOUNDING_VOLUME_INTERSECTION_EPSILON
262#define BOUNDING_VOLUME_INTERSECTION_EPSILON 0.1f
263#endif
264
268#ifndef SURFACE_SHADOW_EPSILON
269#define SURFACE_SHADOW_EPSILON 0.1f
270#endif
271
274#ifndef SURFACE_SHADOW_FALLOFF
275#define SURFACE_SHADOW_FALLOFF 5.0f
276#endif
277
278#ifndef GAMMA_CORRECTION_STRENGTH
281#define GAMMA_CORRECTION_STRENGTH 0.45f
282#endif
283
284
285#endif // EOF