1#define CAMERA_POSITIONS_LENGTH 1
2#define CAMERA_POSITIONS_ARRAY { (float4)(0, -10, 0, 0) }
4#define CAMERA_FACING_DIRECTIONS_LENGTH 1
5#define CAMERA_FACING_DIRECTIONS_ARRAY { (float4)(normalise((float3)(-10, -10, -10)), 0.0f) }
7#define SCENE_BACKGROUND_COLOUR (float3)(0.5f, 0.8f, 0.9f)
9#define MAXIMUM_MARCH_STEPS 300
10#define MAXIMUM_MARCH_DISTANCE 200.0f
11#define SURFACE_INTERSECTION_EPSILON 0.00001f
13#define CAMERA_FOCUS_DISTANCE 0.01f
15#define USE_BOUNDING_VOLUME true
20#define FORCE_FREE_CAMERA true
21#define CAMERA_SPEED 5.0f
28#define AMPLITUDE 10.0f
31#define FREQUENCY_MULTIPLIER 2
32#define AMPLITUDE_MULTIPLIER 0.4f
36 float frequency =
SCALE;
53 light.
ambient = (float3)(0.2f, 0.2f, 0.2f);
54 light.
diffuse = (float3)(0.5f, 0.5f, 0.5f);
55 light.
specular = (float3)(1.0f, 1.0f, 1.0f);
56 light.
position = (float3)(0.0, -100, 0);
66 *distance = f_abs(position.y) - max(
height, 0.0f);
73 colour = (float3)(0, 0.05, 0.8);
81 colour = (float3)(0.9, 0.9, 1);
86 colour = (float3)(0.1, 0.5, 0.2);
94 material.
specular = (float3)(0, 0, 0);
103 return SDF(position,
time, &distance);
108 return fabs(position.y) - 12.0f;
114 SDF(position,
time, &distance);
const uint const uint height
const uint const uint const float time
float snoise2(float x, float y)
A struct representing a light, for use with the phong illumination model.
A struct representing a geometry material, for use with the Phong reflection model.
Light getLight(float time)
#define FREQUENCY_MULTIPLIER
Material SDF(const float3 position, const float time, float *distance)
Material getMaterial(float3 position, float time)
float boundingVolumeDE(float3 position, float time)
float DE(float3 position, float time)
#define AMPLITUDE_MULTIPLIER
float getHeightAt(float x, float y)