Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 37 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,16 @@ mini_rt/
│ ├── ft_paraboloid.c # Paraboloid intersection
│ ├── ft_csg.c # CSG operations (union, intersect, difference)
│ ├── ft_mesh.c # OBJ mesh loading
│ ├── ft_material.c # Material properties (refl, trans, spec, ior)
│ ├── ft_material.c # Material properties (refl, trans, spec, ior, PBR)
│ ├── ft_texture.c # Texture mapping
│ ├── ft_bump.c # Bump/normal mapping
│ ├── ft_bvh.c / ft_bvh_2.c # BVH acceleration structure
│ ├── ft_threads.c # Multi-threaded rendering
│ ├── ft_dof.c # Depth of field
│ ├── ft_motion.c # Motion blur
│ ├── ft_pathtrace.c # Path tracing / global illumination
│ ├── ft_pbr.c # PBR shading (GGX/Cook-Torrance BRDF, Fresnel)
│ ├── ft_env.c # Environment sky lighting
│ ├── ft_precompute.c # Shape precomputation / caching
│ ├── ft_parsing.c / ft_parsing_2.c # Scene file (.rt) parser
│ ├── ft_check_parsing.c / ft_check_parsing_2.c # Input validation
Expand Down Expand Up @@ -134,7 +136,7 @@ mini_rt/
├── libft/ # Custom 42 utility library
├── mlx/ # minilibX (macOS)
├── mlx_linux/ # minilibX (Linux)
├── scenes/ # 19 example .rt scene files
├── scenes/ # 20 example .rt scene files
├── saves/ # Rendered BMP output directory
├── skills/ # Technical documentation
├── .github/workflows/ # CI/CD (GitHub Actions)
Expand Down Expand Up @@ -166,13 +168,17 @@ ft_aff() main render loop
└── Specular highlights
├── Recursive reflection rays (up to MAX_REFLECT_DEPTH=4)
├── Refraction rays (Snell's law with IOR)
├── PBR shading (GGX/Cook-Torrance BRDF, Fresnel, metallic-roughness)
├── ACES filmic tone mapping + sRGB gamma
├── Texture / bump map sampling
├── Depth of field (aperture jitter, DOF_SAMPLES=16)
└── Motion blur (temporal sampling, MOTION_BLUR_SAMPLES=8)
```

Progressive rendering is available: renders at 8x → 4x → 2x → 1x resolution for interactive preview.

Path tracing mode (`--pathtrace N`) features Russian Roulette termination, environment sky lighting, emissive materials, and PBR-aware importance sampling.

### Supported Shapes (14 types)

#### Basic shapes
Expand Down Expand Up @@ -244,6 +250,9 @@ sp 2,0,-5 1.5 255,255,255 trans:0.9 ior:1.5 # Glass sphere
| `refl:` | 0–1 | Reflectivity (recursive, max depth 4) |
| `trans:` | 0–1 | Transparency |
| `ior:` | >0 | Index of refraction (used with `trans`) |
| `metal:` | 0–1 | Metallic factor (PBR metallic-roughness workflow) |
| `rough:` | 0–1 | Surface roughness (0 = mirror, 1 = matte) |
| `emit:` | R,G,B | Emissive light (HDR values allowed, e.g. `emit:500,400,300`) |

### Memory Management

Expand Down Expand Up @@ -315,4 +324,29 @@ GitHub Actions pipeline: build validation, unit tests, regression tests, clang-f

### Scene Files

`scenes/` directory contains 19 test scenes covering basic shapes, extended shapes, quadrics, lighting, interior views, DOF, motion blur, and path tracing.
`scenes/` directory contains 22 test scenes covering basic shapes, extended shapes, quadrics, lighting, interior views, DOF, motion blur, path tracing, PBR materials, and emissive objects.

## Development Workflow

### Every iteration MUST:

1. **`make lint`** — clang-format check passes
2. **`make test`** — all unit tests pass (math, camera, intersections, lighting, parsing, PBR)
3. **`make regression`** — all 19 BMP regression tests pass (requires Xvfb on headless systems: `xvfb-run make regression`)

### When scenes are added or modified:

4. **Re-render `saves/`** — run each changed scene with `-save --output saves/<name>.bmp`
5. **Regenerate `renders_preview/`** — run `python3 tools/bmp_to_png.py saves/ --output renders_preview/`
6. **Note:** `scenes/cathedral_ruins.rt` renders at 2560×1440 and takes ~1h. Render in background or last.

### Scene authoring (post-42 scenes only):

All scenes created after the initial 42 project follow the drone-view guidelines documented in **[skills/camera-and-rendering.md](skills/camera-and-rendering.md)** § "Post-42 Scene Generation Rules":

- Elevated camera with downward tilt (`rot_x` 0.12–0.18), **never** `rot_z = ±1`
- All objects fully visible and well-separated at first glance
- `E` directive for sky gradient background
- If rows of items, all rows visible from above (no occlusion)

Original 42 scenes are left unchanged.
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ SRC_NAME = ft_mini_rt.c \
ft_dof.c \
ft_motion.c \
ft_pathtrace.c \
ft_pbr.c \
ft_env.c \
ft_close.c \
ft_save.c \
ft_error.c
Expand Down Expand Up @@ -166,15 +168,15 @@ SHAPE_SRCS = ft_sphere.c ft_plane.c ft_square.c \
TEST_INTERSECT_SRCS = $(TEST_MATH_SRCS) $(SHAPE_SRCS) \
ft_ray_2.c ft_ray.c ft_light.c ft_precompute.c \
ft_bvh.c ft_bvh_2.c \
ft_random.c ft_dof.c ft_motion.c ft_pathtrace.c \
ft_random.c ft_dof.c ft_motion.c ft_pathtrace.c ft_pbr.c ft_env.c \
ft_parsing.c ft_parsing_2.c ft_check_parsing.c \
ft_check_parsing_2.c ft_bzero_struct.c

TEST_PARSING_SRCS = $(TEST_MATH_SRCS) ft_parsing.c ft_parsing_2.c \
ft_check_parsing.c ft_check_parsing_2.c ft_bzero_struct.c \
$(SHAPE_SRCS) ft_precompute.c \
ft_bvh.c ft_bvh_2.c ft_ray.c ft_ray_2.c ft_light.c \
ft_random.c ft_dof.c ft_motion.c ft_pathtrace.c
ft_random.c ft_dof.c ft_motion.c ft_pathtrace.c ft_pbr.c ft_env.c

TEST_DIR = tests

Expand Down Expand Up @@ -211,6 +213,12 @@ test: $(LIB)
$(TEST_DIR)/test_parsing.c $(TEST_DIR)/test_stubs.c \
$(addprefix $(SRC_DIR)/,$(TEST_PARSING_SRCS)) \
$(TEST_LINK) -o run_test_parsing && ./run_test_parsing
@echo ""
@echo "=== Running PBR tests ==="
@$(CC) -Wall -Wextra -Werror -g3 $(MLX_DEF) $(TEST_INC) \
$(TEST_DIR)/test_pbr.c $(TEST_DIR)/test_stubs.c \
$(addprefix $(SRC_DIR)/,$(TEST_INTERSECT_SRCS)) \
$(TEST_LINK) -o run_test_pbr && ./run_test_pbr

COV_FLAGS = -Wall -Wextra -g3 --coverage -fprofile-arcs -ftest-coverage

Expand All @@ -223,6 +231,7 @@ coverage: $(LIB)
$(TEST_DIR)/test_intersections.c \
$(TEST_DIR)/test_lighting.c \
$(TEST_DIR)/test_parsing.c \
$(TEST_DIR)/test_pbr.c \
$(TEST_DIR)/test_stubs.c \
$(addprefix $(SRC_DIR)/,$(TEST_INTERSECT_SRCS)) \
$(TEST_LINK) -o cov_test_all && ./cov_test_all
Expand All @@ -248,7 +257,7 @@ lint:
TEST_BENCH_SRCS = $(TEST_MATH_SRCS) $(SHAPE_SRCS) \
ft_ray_2.c ft_ray.c ft_light.c ft_precompute.c \
ft_bvh.c ft_bvh_2.c ft_bzero_struct.c \
ft_random.c ft_dof.c ft_motion.c ft_pathtrace.c \
ft_random.c ft_dof.c ft_motion.c ft_pathtrace.c ft_pbr.c ft_env.c \
ft_parsing.c ft_parsing_2.c ft_check_parsing.c \
ft_check_parsing_2.c

Expand All @@ -264,7 +273,7 @@ gen_scene:
@echo "Built gen_scene tool"

testclean:
$(RM) run_test_math run_test_camera run_test_intersections run_test_lighting run_test_parsing run_benchmark
$(RM) run_test_math run_test_camera run_test_intersections run_test_lighting run_test_parsing run_test_pbr run_benchmark
$(RM) cov_test_math cov_test_intersections cov_test_lighting cov_test_parsing cov_test_all
$(RM) -r coverage
$(RM) *.gcno *.gcda src/*.gcno src/*.gcda tests/*.gcno tests/*.gcda
Expand Down
9 changes: 9 additions & 0 deletions includes/mini_rt.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ typedef struct s_material
double tex_scale_u;
double tex_scale_v;
double bump_strength;
double metallic;
double roughness;
t_argb emission;
t_texture *texture;
t_texture *bump_map;
t_pt vel;
Expand Down Expand Up @@ -248,6 +251,7 @@ typedef struct s_window
int path_trace_spp;
int path_trace_bounces;
int motion_blur_samples;
int use_env_sky;
} t_window;

typedef struct s_thread_data
Expand Down Expand Up @@ -483,6 +487,11 @@ void ft_ray_motion(double i, double j, t_window *win, t_cam *cam);

void ft_pathtrace_pixel(double i, double j, t_window *win, t_cam *cam);

t_argb ft_pbr_shade(t_pt view, t_pt light_dir, t_pt normal, t_material *mat,
t_argb light_col, t_argb albedo);
double ft_fresnel_schlick(double cos_theta, double f0);
t_argb ft_env_sky(t_pt dir);

int ft_save(t_window *win);
int ft_file_header(int fd, t_window *rt);
int ft_info_header(int fd, t_window *rt);
Expand Down
Binary file added renders_preview/benchmark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/cathedral_ruins.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/cornell_box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/cylinder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/dof_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/glass_spheres.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/inside_cy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/inside_cy_l.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/inside_sp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/inside_sp_l.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/lights.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/materials.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/mixed_shapes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/motion_blur.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/new_shapes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/objects.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/pbr_showcase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/quadrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/reflections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/scene_basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/scene_new_shapes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/solar_system.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/spiral.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/taurus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added renders_preview/triangle.png
Binary file added saves/benchmark.bmp
Binary file not shown.
Binary file added saves/dof_test.bmp
Binary file not shown.
Binary file added saves/materials.bmp
Binary file not shown.
Binary file added saves/motion_blur.bmp
Binary file not shown.
Binary file modified saves/new_shapes.bmp
Binary file not shown.
Binary file added saves/pbr_showcase.bmp
Binary file not shown.
Binary file modified saves/quadrics.bmp
Binary file not shown.
3 changes: 2 additions & 1 deletion scenes/benchmark.rt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
R 1920 1080
A 0.1 255,255,255
E

c 0,20,-60 0,-0.3,1 70
c 0,30,60 0.12,0,0 70

l -30,40,-20 0.8 255,255,200
l 30,40,-20 0.6 200,200,255
Expand Down
1 change: 1 addition & 0 deletions scenes/cathedral_ruins.rt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
R 2560 1440
A 0.08 200,190,170
E

c 0.0,6.0,12.0 0.03,0,0 70

Expand Down
1 change: 1 addition & 0 deletions scenes/dof_test.rt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
R 800 600
A 0.15 255,255,255
E

c 0,3,15 0.05,0,0 60 aperture:0.15 focal:15.0

Expand Down
23 changes: 23 additions & 0 deletions scenes/materials.rt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
R 1920 1080
A 0.1 255,255,255
E
c 0,15,35 0.08,0,0 65
l -12,28,20 0.8 255,250,240
l 15,22,30 0.5 220,235,255
l 0,12,40 0.25 255,255,255

pl 0,-0.5,0 0,1,0 230,230,235

sp -10,2.5,10 5.0 255,80,80 spec:0.9
sp -3,2.5,10 5.0 200,220,255 refl:0.6 spec:0.5
sp 4,2.5,10 5.0 255,255,255 trans:0.9 ior:1.5 spec:0.3
sp 11,2.5,10 5.0 220,240,255 trans:0.8 ior:2.4 spec:0.4

sp -10,2.5,-2 5.0 230,230,240 metal:1.0 rough:0.05 spec:1.0
sp -3,2.5,-2 5.0 200,200,210 metal:1.0 rough:0.4 spec:0.7
sp 4,2.5,-2 5.0 170,150,140 metal:1.0 rough:0.8 spec:0.3
sp 11,2.5,-2 5.0 50,180,80 metal:0.0 rough:0.1 spec:0.8

bx -8,3,-14 6,6,6 255,200,100 emit:400,300,200
cy 0,0,-14 0,1,0 2.5 6.0 180,210,240 metal:0.7 rough:0.2 refl:0.3 spec:0.8
co 8,0,-14 0,1,0 3.5 6.0 200,180,255 trans:0.5 ior:1.3 spec:0.6
1 change: 1 addition & 0 deletions scenes/motion_blur.rt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
R 800 600
A 0.15 255,255,255
E

c 0,5,20 0.05,0,0 60

Expand Down
20 changes: 11 additions & 9 deletions scenes/new_shapes.rt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
R 1920 1080
A 0.18 255,255,255
c 0,4,12 0,-0.15,-1 70
l 0,20,5 0.45 255,255,255
E
c 0,14,28 0.15,0,0 70
l -10,25,10 0.55 255,250,240
l 10,15,20 0.35 220,230,255

sp -8,1.5,-3 3.0 255,30,30
co -4,0,-3 0,1,0 2.0 4.0 30,255,30
dk 0,2,-5 0,0,1 4.0 255,255,30
el 4,1.5,-3 2.0,1.2,1.2 30,80,255
bx 8,1.5,-3 3,3,3 255,140,0
to 0,5,-8 0,1,0 2.5 0.7 255,30,255
cy -6,-0.5,-8 0,1,0 1.5 3.0 0,200,200
sp -12,1.5,2 3.0 255,30,30
co -6,0,2 0,1,0 2.0 4.0 30,255,30
dk 0,2,0 0,0,1 4.0 255,255,30
el 6,1.5,2 2.0,1.2,1.2 30,80,255
bx 12,1.5,2 3,3,3 255,140,0
to -4,4,-6 0,1,0 2.5 0.7 255,30,255
cy 6,0,-6 0,1,0 1.5 3.0 0,200,200
pl 0,-1,0 0,1,0 220,220,230
23 changes: 23 additions & 0 deletions scenes/pbr_showcase.rt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
R 1920 1080
A 0.12 255,255,255
E
c 0,16,38 0.07,0,0 65
l -15,30,25 0.85 255,250,240
l 20,25,35 0.55 220,235,255
l 0,15,50 0.3 255,255,255

pl 0,-0.5,0 0,1,0 230,230,235

sp -12,2.5,14 5.0 230,30,30 spec:0.8
sp -4,2.5,14 5.0 30,200,60 spec:0.5
sp 4,2.5,14 5.0 40,80,230 spec:0.3
sp 12,2.5,14 5.0 255,255,255 trans:0.9 ior:1.5

sp -12,2.5,0 5.0 240,240,245 metal:1.0 rough:0.05 spec:1.0
sp -4,2.5,0 5.0 210,210,220 metal:1.0 rough:0.3 spec:0.8
sp 4,2.5,0 5.0 180,160,150 metal:1.0 rough:0.6 spec:0.5
sp 12,2.5,0 5.0 230,150,90 metal:1.0 rough:0.9 spec:0.3

bx -10,3,-14 6,6,6 255,210,60 metal:1.0 rough:0.2 spec:0.9
cy 0,0,-14 0,1,0 3.0 7.0 180,220,255 metal:0.7 rough:0.15 spec:0.9
co 10,0,-14 0,1,0 4.0 7.0 100,255,140 metal:0.5 rough:0.3 spec:0.7
14 changes: 8 additions & 6 deletions scenes/quadrics.rt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
R 1920 1080
A 0.25 255,255,255
c 0,5,14 0,-0.2,-1 70
E
c 0,14,24 0.15,0,0 70
l -3,20,8 0.60 255,255,255
l 5,15,15 0.35 220,230,255

hy -5,2,-4 0,1,0 1.5,2.0,0 6.0 255,80,30
pa 0,0,-4 0,1,0 0.8 5.0 30,200,255
co 5,0,-4 0,1,0 2.5 5.0 80,255,80
sp -5,6,-4 1.0 255,255,100
bx 5,5.5,-4 1.5,1.5,1.5 255,100,255
hy -8,2,0 0,1,0 1.5,2.0,0 6.0 255,80,30
pa 0,0,0 0,1,0 0.8 5.0 30,200,255
co 8,0,0 0,1,0 2.5 5.0 80,255,80
sp -4,6,0 1.0 255,255,100
bx 4,5.5,0 1.5,1.5,1.5 255,100,255
pl 0,-1,0 0,1,0 220,220,230
1 change: 1 addition & 0 deletions scenes/taurus.rt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
R 1920 1080
A 0.08 255,255,255
E
c 0,14,20 0.2,0,0 60
l -10,20,20 0.5 255,245,235
l 10,18,15 0.4 235,240,255
Expand Down
42 changes: 42 additions & 0 deletions skills/camera-and-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,45 @@ DISPLAY=:42 ./miniRT scene.rt -save
- Neutral wall/plane colors of 150–200 work better than 220–240 for scenes with white/reflective objects
- At least 2 lights from different angles improves depth perception

## Post-42 Scene Generation Rules

All scenes created after the initial 42 project **MUST** follow these rules. Original 42 scenes (cylinder, exemple, inside_cy, inside_cy_l, inside_sp, inside_sp_l, lights, objects, square, tiny, triangle, error) are left as-is.

### Drone-view camera placement

Every showcase scene uses an elevated "drone view" where **all objects are fully visible at first glance**:

| Parameter | Rule | Typical range |
|-----------|------|---------------|
| Camera Y | max_object_height + 8–12 | 12–16 |
| Camera Z | furthest_object_z + scene_x_span × 0.8 | 20–40 |
| rot_x (pitch) | 0.12–0.18 (22°–32° downward tilt) | 0.15 |
| rot_y (yaw) | 0 always | 0 |
| rot_z (roll) | 0 always (**never** ±1) | 0 |
| FOV | 65–70° | 70 |

**Checklist for row-based layouts** (e.g. materials, pbr_showcase):
- All objects in every row must be fully visible — no clipping at frame edges
- Clear ground visible between rows (at least 4–6 units of Z separation)
- Camera high enough that rear rows are not occluded by front rows

### Sky background

Add the `E` directive (on its own line, after `A`) to enable the gradient sky. This replaces the black void with a blue-to-white horizon gradient.

```
R 1920 1080
A 0.15 255,255,255
E
c 0,14,28 0.15,0,0 70
```

### Object layout

- Spread objects along X with at least 1 diameter of spacing between them
- Use 2+ lights from different angles for depth/shadow separation
- Ground plane color: light gray (220–235) to contrast with objects and sky

### Material properties (parsed in `ft_material.c`)

Appended to shape lines as `key:value` pairs:
Expand All @@ -149,6 +188,9 @@ Appended to shape lines as `key:value` pairs:
| `refl:` | 0–1 | Reflectivity (recursive ray tracing, max depth 4) |
| `trans:` | 0–1 | Transparency |
| `ior:` | >0 | Index of refraction (used with trans) |
| `metal:` | 0–1 | Metallic factor (PBR metallic-roughness workflow) |
| `rough:` | 0–1 | Surface roughness (0 = mirror, 1 = matte) |
| `emit:` | R,G,B | Emissive light (HDR values allowed, e.g. `emit:500,400,300`) |

### Supported shape IDs

Expand Down
Loading
Loading