enginerenderer 0.0.1

A zero-dependency offline rendering engine in pure Rust — CPU path tracing, BVH acceleration, 16-band spectral rendering, PBR materials, animation & video export.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
use crate::core::engine::rendering::{
    effects::volumetric_effects::medium::VolumetricMedium,
    environment::procedural::ProceduralEnvironment,
    loader::content_loader::ContentLoader,
    loader::glb_loader::GlbLoader,
    loader::obj_loader::ObjLoader,
    materials::material::MaterialLibrary,
    mesh::{
        asset::MeshAsset,
        operations::{compute_tangents, recalculate_normals, subdivide},
    },
    raytracing::{AreaLight, Camera, DirectionalLight, Material, Scene, Sphere, Vec3},
};
use std::sync::OnceLock;

use super::{
    celestial::CelestialBodies,
    graph::SceneGraph,
    objects::{append_car, append_house, append_tree},
    primitives::{RingSpec, append_box, append_ring},
    world::{append_celestial_panorama, append_showcase_world},
};

use crate::core::coremanager::camera_manager::CameraManager;
use crate::core::scheduler::resource::ResourceManager;

#[derive(Debug, Clone)]
/// Runtime scene bundle containing scene, camera and graph context.
pub struct EngineScene {
    /// Renderable scene data.
    pub scene: Scene,
    /// Camera for the scene.
    pub camera: Camera,
    /// Scene graph metadata.
    pub graph: SceneGraph,
}

#[derive(Debug, Clone)]
/// Dedicated showcase shot descriptor.
pub struct ShowcaseShot {
    /// Stable shot name.
    pub name: &'static str,
    /// Shot scene.
    pub scene: Scene,
    /// Shot camera.
    pub camera: Camera,
}

#[derive(Debug, Clone, Copy)]
/// Controls runtime scene complexity for realtime rendering.
pub struct SceneComplexity {
    /// Maximum number of showcase meshes.
    pub showcase_mesh_budget: usize,
    /// Maximum number of area lights.
    pub area_light_budget: usize,
    /// Enables or disables panorama additions.
    pub panorama_enabled: bool,
    /// Enables refined showcase mesh processing.
    pub refined_showcase_meshes: bool,
    /// Enables proxy showcase mesh generation.
    pub proxy_showcase_meshes: bool,
}

impl SceneComplexity {
    /// Returns an unconstrained complexity profile.
    pub fn full() -> Self {
        Self {
            showcase_mesh_budget: usize::MAX,
            area_light_budget: usize::MAX,
            panorama_enabled: true,
            refined_showcase_meshes: true,
            proxy_showcase_meshes: false,
        }
    }
}

impl EngineScene {
    /// Builds an engine scene from celestial bodies with default complexity.
    pub fn from_bodies(
        catalog: &CelestialBodies,
        camera_manager: &CameraManager,
        resource_manager: &ResourceManager,
        graph: SceneGraph,
        aspect_ratio: f64,
        time: f64,
    ) -> Self {
        Self::from_bodies_with_complexity(
            catalog,
            camera_manager,
            resource_manager,
            graph,
            aspect_ratio,
            time,
            SceneComplexity::full(),
        )
    }

    /// Builds an engine scene from celestial bodies with explicit complexity.
    pub fn from_bodies_with_complexity(
        catalog: &CelestialBodies,
        camera_manager: &CameraManager,
        resource_manager: &ResourceManager,
        graph: SceneGraph,
        aspect_ratio: f64,
        time: f64,
        complexity: SceneComplexity,
    ) -> Self {
        let mut scene = catalog.to_scene();
        let environment = resource_manager.environment();
        let luminous_nodes = graph.luminous_node_count().max(1) as f64;
        let geometric_scale = (graph.average_radius() + graph.radial_extent_hint() * 0.05).max(1.0);

        scene.sky_top = environment.sky_top;
        scene.sky_bottom = environment.sky_bottom;
        scene.sun.direction = environment.sun_direction;
        scene.sun.color = environment.sun_color;
        scene.sun.intensity = environment.sun_intensity * (1.0 + luminous_nodes * 0.03);
        scene.sun.angular_radius = environment.sun_angular_radius;
        scene.exposure = environment.exposure * resource_manager.surface_detail_scale()
            / geometric_scale.powf(0.08);
        scene.volume = scene.volume.with_density_multiplier(
            0.92 + luminous_nodes * 0.04 + resource_manager.surface_detail_scale() * 0.06,
        );
        scene.hdri = Some(ProceduralEnvironment::cinematic_space());
        scene.solar_elevation = environment.solar_elevation;

        let showcase_anchor = graph.focus_point() + Vec3::new(0.2, 0.0, 5.4);
        let showcase_meshes = cached_showcase_meshes(
            complexity.refined_showcase_meshes,
            complexity.proxy_showcase_meshes,
        );

        scene.triangles = showcase_meshes
            .iter()
            .take(complexity.showcase_mesh_budget)
            .enumerate()
            .flat_map(|(index, mesh)| {
                let translation = showcase_anchor
                    + Vec3::new(
                        -3.8 + index as f64 * 1.25,
                        0.38 + (index % 3) as f64 * 0.46,
                        -1.0 + index as f64 * 0.72,
                    );
                let scale = (0.16 + mesh.descriptor.bounding_radius * 0.10).clamp(0.14, 0.48);
                let fallback_material = match index % 4 {
                    0 => MaterialLibrary::metallic_moon(),
                    1 => MaterialLibrary::rocky_world(Vec3::new(0.58, 0.46, 0.34)),
                    2 => MaterialLibrary::icy_world(),
                    _ => MaterialLibrary::ocean_world(),
                };
                mesh.to_triangles(translation, scale, mesh.material_or(fallback_material))
            })
            .collect();

        scene.area_lights = vec![
            AreaLight {
                position: graph.focus_point() + Vec3::new(-2.6, 3.0, 2.2),
                u: Vec3::new(1.1, 0.0, 0.0),
                v: Vec3::new(0.0, 0.0, 1.3),
                color: Vec3::new(1.0, 0.84, 0.72),
                intensity: 1.8,
            },
            AreaLight {
                position: graph.focus_point() + Vec3::new(2.2, 2.5, -1.6),
                u: Vec3::new(0.0, 0.8, 0.0),
                v: Vec3::new(0.0, 0.0, 1.1),
                color: Vec3::new(0.66, 0.78, 1.0),
                intensity: 1.5,
            },
            AreaLight {
                position: graph.focus_point() + Vec3::new(0.4, 4.4, -3.2),
                u: Vec3::new(1.4, 0.0, 0.0),
                v: Vec3::new(0.0, 0.7, 1.2),
                color: Vec3::new(0.94, 0.96, 1.0),
                intensity: 1.0,
            },
        ]
        .into_iter()
        .take(complexity.area_light_budget)
        .collect();

        if complexity.panorama_enabled {
            append_celestial_panorama(&mut scene, graph.focus_point());
        }

        scene.sun.intensity *= 1.12;
        scene.exposure *= 1.04 + (scene.triangles.len() as f64).ln().max(0.0) * 0.010;

        let camera =
            build_showcase_camera(camera_manager, &graph, showcase_anchor, aspect_ratio, time);

        Self {
            scene,
            camera,
            graph,
        }
    }

    /// Builds the realtime camera corresponding to the current graph and time.
    pub fn realtime_camera(
        camera_manager: &CameraManager,
        graph: &SceneGraph,
        aspect_ratio: f64,
        time: f64,
    ) -> Camera {
        let showcase_anchor = graph.focus_point() + Vec3::new(0.2, 0.0, 5.4);
        build_showcase_camera(camera_manager, graph, showcase_anchor, aspect_ratio, time)
    }

    /// Returns the number of scene graph nodes.
    pub fn node_count(&self) -> usize {
        self.graph.node_count()
    }

    /// Returns the dedicated gallery shot list.
    pub fn dedicated_gallery_shots() -> Vec<ShowcaseShot> {
        vec![
            build_car_showcase(),
            build_tree_showcase(),
            build_house_showcase(),
            build_world_showcase(),
            build_planet_showcase(),
            build_sun_showcase(),
            build_black_hole_showcase(),
        ]
    }
}

fn cached_showcase_meshes(refined: bool, proxy: bool) -> &'static [MeshAsset] {
    static RAW_SHOWCASE_MESHES: OnceLock<Vec<MeshAsset>> = OnceLock::new();
    static REFINED_SHOWCASE_MESHES: OnceLock<Vec<MeshAsset>> = OnceLock::new();
    static PROXY_SHOWCASE_MESHES: OnceLock<Vec<MeshAsset>> = OnceLock::new();

    let load_meshes = || {
        let content_bundle = ContentLoader.load_showcase_bundle();
        let obj_meshes = ObjLoader.load_embedded_showcase();
        let glb_meshes = GlbLoader.load_embedded_showcase();
        content_bundle
            .primary_meshes
            .into_iter()
            .chain(content_bundle.cinematic_meshes)
            .chain(obj_meshes)
            .chain(glb_meshes)
            .collect::<Vec<_>>()
    };

    if proxy {
        PROXY_SHOWCASE_MESHES.get_or_init(|| {
            load_meshes()
                .into_iter()
                .map(|mesh| showcase_proxy_mesh(&mesh))
                .collect()
        })
    } else if refined {
        REFINED_SHOWCASE_MESHES.get_or_init(|| {
            load_meshes()
                .into_iter()
                .map(|mesh| refine_mesh_for_render(&mesh))
                .collect()
        })
    } else {
        RAW_SHOWCASE_MESHES.get_or_init(load_meshes)
    }
}

fn showcase_proxy_mesh(mesh: &MeshAsset) -> MeshAsset {
    let mut proxy =
        MeshAsset::procedural_asteroid(&mesh.name, mesh.descriptor.bounding_radius.max(0.12), 1);
    proxy.preferred_material = mesh.preferred_material;
    proxy
}

fn refine_mesh_for_render(mesh: &MeshAsset) -> MeshAsset {
    let mut refined = mesh.clone();
    let extra_passes = if refined.descriptor.triangle_count < 256 {
        2
    } else if refined.descriptor.triangle_count < 2_048 {
        1
    } else {
        0
    };

    for _ in 0..extra_passes {
        subdivide(&mut refined);
    }

    if extra_passes > 0 {
        recalculate_normals(&mut refined);
        compute_tangents(&mut refined);
        refined.descriptor.vertex_count = refined.vertices.len();
        refined.descriptor.triangle_count = refined.indices.len() / 3;
        refined.descriptor.bounding_radius = refined
            .vertices
            .iter()
            .map(|vertex| vertex.position.length())
            .fold(mesh.descriptor.bounding_radius.max(0.001), f64::max);
    }

    refined
}

fn build_showcase_camera(
    camera_manager: &CameraManager,
    graph: &SceneGraph,
    showcase_anchor: Vec3,
    aspect_ratio: f64,
    time: f64,
) -> Camera {
    let hero_target =
        graph.focus_point() * 0.58 + showcase_anchor * 0.42 + Vec3::new(0.6, 0.9, -0.25);
    let scene_scale = graph.scene_radius().max(1.0);
    let orbit = (camera_manager.distance_to_focus() * 0.72)
        .max(scene_scale * 1.45)
        .clamp(9.0, 18.0);
    let lift = orbit * 0.24 + (time * 0.22).sin() * 0.25;
    let origin = hero_target + Vec3::new(-orbit * 0.82, lift, orbit * 0.94);
    let fov = (34.0 - scene_scale * 0.18).clamp(28.0, 36.0);
    let aperture = (scene_scale / 1600.0).clamp(0.002, 0.005);

    Camera::look_at(
        origin,
        hero_target,
        Vec3::new(0.0, 1.0, 0.0),
        fov,
        aspect_ratio,
    )
    .with_physical_lens(aperture, 0.0, Vec3::ZERO)
}

// ── Gallery helpers ─────────────────────────────────────────────────────

fn gallery_scene_template(
    sky_top: Vec3,
    sky_bottom: Vec3,
    exposure: f64,
    sun_intensity: f64,
) -> Scene {
    Scene {
        objects: Vec::new(),
        triangles: Vec::new(),
        sun: DirectionalLight {
            direction: Vec3::new(-0.55, -0.85, -0.45).normalize(),
            color: Vec3::new(1.0, 0.95, 0.88),
            intensity: sun_intensity,
            angular_radius: 0.045,
        },
        area_lights: vec![AreaLight {
            position: Vec3::new(-2.0, 3.0, 2.2),
            u: Vec3::new(1.2, 0.0, 0.0),
            v: Vec3::new(0.0, 0.0, 1.2),
            color: Vec3::new(1.0, 0.84, 0.72),
            intensity: 1.6,
        }],
        sky_top,
        sky_bottom,
        exposure,
        volume: VolumetricMedium::cinematic_nebula().with_density_multiplier(0.45),
        hdri: Some(ProceduralEnvironment::cinematic_space()),
        solar_elevation: 0.52,
    }
}

fn build_car_showcase() -> ShowcaseShot {
    let mut scene = gallery_scene_template(
        Vec3::new(0.06, 0.10, 0.28),
        Vec3::new(0.22, 0.26, 0.36),
        1.08,
        1.6,
    );
    append_box(
        &mut scene.triangles,
        Vec3::new(0.0, -0.14, 0.0),
        Vec3::new(4.4, 0.12, 2.4),
        MaterialLibrary::architectural_plaster(),
    );
    append_box(
        &mut scene.triangles,
        Vec3::new(0.0, 0.02, 0.0),
        Vec3::new(3.8, 0.02, 1.1),
        MaterialLibrary::asphalt(),
    );
    append_car(
        &mut scene,
        Vec3::new(0.0, 0.0, 0.0),
        1.4,
        Vec3::new(0.86, 0.14, 0.10),
    );
    append_tree(&mut scene, Vec3::new(-2.6, 0.0, -1.4), 0.9);
    append_tree(&mut scene, Vec3::new(2.9, 0.0, -1.7), 1.0);
    let camera = Camera::look_at(
        Vec3::new(-2.4, 1.5, 4.8),
        Vec3::new(0.2, 0.55, 0.0),
        Vec3::new(0.0, 1.0, 0.0),
        32.0,
        16.0 / 9.0,
    )
    .with_physical_lens(0.022, 0.012, Vec3::ZERO);
    ShowcaseShot {
        name: "car",
        scene,
        camera,
    }
}

fn build_tree_showcase() -> ShowcaseShot {
    let mut scene = gallery_scene_template(
        Vec3::new(0.05, 0.09, 0.24),
        Vec3::new(0.20, 0.24, 0.34),
        1.02,
        1.55,
    );
    append_box(
        &mut scene.triangles,
        Vec3::new(0.0, -0.14, 0.0),
        Vec3::new(3.8, 0.12, 3.2),
        MaterialLibrary::architectural_plaster(),
    );
    append_tree(&mut scene, Vec3::new(0.0, 0.0, 0.0), 1.8);
    append_house(&mut scene, Vec3::new(2.6, 0.0, -1.2), 0.7);
    let camera = Camera::look_at(
        Vec3::new(2.2, 2.0, 4.4),
        Vec3::new(0.0, 1.5, 0.0),
        Vec3::new(0.0, 1.0, 0.0),
        30.0,
        16.0 / 9.0,
    )
    .with_physical_lens(0.020, 0.010, Vec3::ZERO);
    ShowcaseShot {
        name: "tree",
        scene,
        camera,
    }
}

fn build_house_showcase() -> ShowcaseShot {
    let mut scene = gallery_scene_template(
        Vec3::new(0.06, 0.10, 0.26),
        Vec3::new(0.21, 0.25, 0.35),
        1.06,
        1.62,
    );
    append_box(
        &mut scene.triangles,
        Vec3::new(0.0, -0.14, 0.0),
        Vec3::new(4.8, 0.12, 3.6),
        MaterialLibrary::architectural_plaster(),
    );
    append_house(&mut scene, Vec3::new(0.0, 0.0, 0.0), 1.4);
    append_car(
        &mut scene,
        Vec3::new(-1.8, 0.0, 1.2),
        0.8,
        Vec3::new(0.18, 0.32, 0.80),
    );
    append_tree(&mut scene, Vec3::new(2.6, 0.0, -0.8), 1.0);
    let camera = Camera::look_at(
        Vec3::new(-3.4, 2.1, 5.8),
        Vec3::new(0.2, 1.1, 0.0),
        Vec3::new(0.0, 1.0, 0.0),
        34.0,
        16.0 / 9.0,
    )
    .with_physical_lens(0.022, 0.014, Vec3::ZERO);
    ShowcaseShot {
        name: "house",
        scene,
        camera,
    }
}

fn build_world_showcase() -> ShowcaseShot {
    let mut scene = gallery_scene_template(
        Vec3::new(0.05, 0.10, 0.24),
        Vec3::new(0.20, 0.24, 0.34),
        1.08,
        1.65,
    );
    append_showcase_world(&mut scene, Vec3::new(0.0, 0.0, 0.0));
    scene.area_lights.push(AreaLight {
        position: Vec3::new(0.0, 4.8, -2.4),
        u: Vec3::new(2.4, 0.0, 0.0),
        v: Vec3::new(0.0, 0.8, 2.0),
        color: Vec3::new(0.82, 0.88, 1.0),
        intensity: 1.2,
    });
    let camera = Camera::look_at(
        Vec3::new(-7.8, 3.6, 8.8),
        Vec3::new(0.0, 0.8, 0.0),
        Vec3::new(0.0, 1.0, 0.0),
        34.0,
        16.0 / 9.0,
    )
    .with_physical_lens(0.020, 0.016, Vec3::ZERO);
    ShowcaseShot {
        name: "world",
        scene,
        camera,
    }
}

fn build_planet_showcase() -> ShowcaseShot {
    let mut scene = gallery_scene_template(
        Vec3::new(0.010, 0.016, 0.045),
        Vec3::new(0.001, 0.001, 0.006),
        1.32,
        1.25,
    );
    scene.volume = VolumetricMedium::cinematic_nebula().with_density_multiplier(0.35);
    let center = Vec3::new(0.0, 0.2, 0.0);
    scene.objects.push(Sphere {
        center,
        radius: 2.2,
        material: MaterialLibrary::lush_planet(),
    });
    scene.objects.push(Sphere {
        center: center + Vec3::new(2.6, 0.55, 1.1),
        radius: 0.42,
        material: MaterialLibrary::metallic_moon(),
    });
    append_ring(
        &mut scene.triangles,
        RingSpec {
            center,
            inner_radius: 2.6,
            outer_radius: 3.8,
            axis_u: Vec3::new(1.0, 0.0, 0.0),
            axis_v: Vec3::new(0.0, 0.22, 1.0).normalize(),
            segments: 28,
            material: Material::new(Vec3::new(0.70, 0.66, 0.54), 0.76, 0.03, 0.05, Vec3::ZERO)
                .with_layers(0.94, 0.02, Vec3::new(0.04, 0.04, 0.03))
                .with_optics(0.08, 0.04, 0.02),
        },
    );
    let camera = Camera::look_at(
        Vec3::new(-5.0, 2.0, 5.8),
        Vec3::new(0.0, 0.2, 0.0),
        Vec3::new(0.0, 1.0, 0.0),
        24.0,
        16.0 / 9.0,
    )
    .with_physical_lens(0.018, 0.020, Vec3::ZERO);
    ShowcaseShot {
        name: "planet",
        scene,
        camera,
    }
}

fn build_sun_showcase() -> ShowcaseShot {
    let mut scene = gallery_scene_template(
        Vec3::new(0.012, 0.018, 0.050),
        Vec3::new(0.001, 0.001, 0.005),
        1.55,
        1.10,
    );
    scene.volume = VolumetricMedium::cinematic_nebula().with_density_multiplier(0.35);
    scene.objects.push(Sphere {
        center: Vec3::new(0.0, 0.0, 0.0),
        radius: 2.8,
        material: MaterialLibrary::solar_corona(),
    });
    scene.area_lights.push(AreaLight {
        position: Vec3::new(-0.4, 0.6, 1.0),
        u: Vec3::new(1.8, 0.0, 0.0),
        v: Vec3::new(0.0, 1.6, 0.7),
        color: Vec3::new(1.0, 0.72, 0.34),
        intensity: 1.2,
    });
    let camera = Camera::look_at(
        Vec3::new(-7.0, 2.5, 8.5),
        Vec3::new(0.0, 0.0, 0.0),
        Vec3::new(0.0, 1.0, 0.0),
        22.0,
        16.0 / 9.0,
    )
    .with_physical_lens(0.016, 0.018, Vec3::ZERO);
    ShowcaseShot {
        name: "sun",
        scene,
        camera,
    }
}

fn build_black_hole_showcase() -> ShowcaseShot {
    let mut scene = gallery_scene_template(
        Vec3::new(0.008, 0.010, 0.032),
        Vec3::new(0.001, 0.001, 0.004),
        1.60,
        0.95,
    );
    scene.volume = VolumetricMedium::cinematic_nebula().with_density_multiplier(0.40);
    let center = Vec3::new(0.0, 0.0, 0.0);
    scene.objects.push(Sphere {
        center,
        radius: 2.1,
        material: MaterialLibrary::event_horizon(),
    });
    append_ring(
        &mut scene.triangles,
        RingSpec {
            center,
            inner_radius: 2.6,
            outer_radius: 4.6,
            axis_u: Vec3::new(1.0, 0.0, 0.0),
            axis_v: Vec3::new(0.0, 0.34, 1.0).normalize(),
            segments: 36,
            material: MaterialLibrary::accretion_disk(),
        },
    );
    scene.area_lights.push(AreaLight {
        position: Vec3::new(-1.4, 0.5, 1.3),
        u: Vec3::new(1.3, 0.0, 0.0),
        v: Vec3::new(0.0, 0.4, 1.6),
        color: Vec3::new(0.96, 0.56, 0.22),
        intensity: 1.8,
    });
    let camera = Camera::look_at(
        Vec3::new(-5.2, 1.8, 6.2),
        Vec3::new(0.0, 0.0, 0.0),
        Vec3::new(0.0, 1.0, 0.0),
        23.0,
        16.0 / 9.0,
    )
    .with_physical_lens(0.018, 0.020, Vec3::ZERO);
    ShowcaseShot {
        name: "black_hole",
        scene,
        camera,
    }
}