1#define CAMERA_POSITIONS_LENGTH 1
2#define CAMERA_POSITIONS_ARRAY { (float4)(10, -10, -10, 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.78f, 0.78f, 0.73f)
9#define SURFACE_INTERSECTION_EPSILON 0.00001f
10#define MAXIMUM_MARCH_STEPS 200
11#define MAXIMUM_MARCH_DISTANCE 50.0f
14#define DO_HARD_SHADOWS true
22 light.
ambient = (float3)(0.2f, 0.2f, 0.2f);
23 light.
diffuse = (float3)(0.5f, 0.5f, 0.5f);
24 light.
specular = (float3)(1.0f, 1.0f, 1.0f);
25 light.
position = (float3)(25, -25, 25);
34 material.
ambient = (float3)(0.92f, 0.30f, 0.16f);
36 material.
specular = (float3)(0.5f, 0.5f, 0.5f);
44 float offset = -sin(
time * 0.5f) * 1.0f;
46 float distance = opSmoothUnion(
47 sphereSDF(position, (float3)(0.0f, offset, 0.0f), 3.5f),
48 boxSDF(position, (float3)(0.0f, offset, 0.0f), (float3)(4.0f, 0.5f, 4.0f)),
49 (-sin(
time * 0.5f) + 1.0f) * 1.5f
const uint const uint const float time
Light getLight(float time)
Material getMaterial(float3 position, float time)
float DE(float3 position, float time)
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.