Tweak compile configuration and presentation example

This commit is contained in:
hal8174 2025-07-15 19:18:10 +02:00
parent 6e57187e3a
commit ee39d9d631
Signed by: hal8174
SSH key fingerprint: SHA256:JwuqS+eVfISfKr+DkDQ6NWAbGd1jFAHkPpCM1yCnlTs
4 changed files with 16 additions and 9 deletions

View file

@ -1,3 +1,3 @@
[build]
rustflags = ["-C raget-cpu=native"]
rustflags = ["-C", "target-cpu=native"]

View file

@ -1,3 +1,7 @@
[workspace]
members = [ "ray-tracing-core", "ray-tracing-image", "ray-tracing-material", "ray-tracing-renderer", "ray-tracing-scene", "ray-tracing-tev", "ray-tracing-egui", "ray-tracing-material-visualizer"]
resolver = "2"
[profile.release]
codegen-units = 1
lto = "fat"

View file

@ -94,10 +94,11 @@ impl<R: Rng + 'static> ExampleScene<R> for MISTest<R> {
let area = light_offset * light_offset * 4.0;
let material_offset = materials.len() as u32;
let color = match i % 3 {
0 => Color::new(1.0, 0.0, 0.0),
1 => Color::new(0.0, 1.0, 0.0),
2 => Color::new(0.0, 0.0, 1.0),
let color = match i % 4 {
0 => Color::white(),
1 => Color::new(1.0, 0.0, 0.0),
2 => Color::new(0.0, 1.0, 0.0),
3 => Color::new(0.0, 0.0, 1.0),
_ => unreachable!(),
};
materials.push(BVHMaterial::new_light(AreaLight::new(color * 10.0 / area)));

View file

@ -39,12 +39,14 @@ impl<R: Rng + 'static> ExampleScene<R> for Presentation<R> {
let materials = vec![
BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.8, 0.8, 0.8))),
BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.9, 0.2, 0.2))),
BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.2, 0.9, 0.2))),
BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.8, 0.8, 0.8))),
BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.8, 0.8, 0.8))),
// BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.9, 0.2, 0.2))),
// BVHMaterial::new_material(OrenNayar::new(0.5, Color::new(0.2, 0.9, 0.2))),
BVHMaterial::new_light(AreaLight::new(Color::white() * 30.0)),
BVHMaterial::new_material(Iridescent::new(250.0, 250.0, 1.0, 1.5, 20)),
BVHMaterial::new_material(Iridescent::new(0.9 * 988.0, 0.1 * 988.0, 1.0, 1.5, 20)),
BVHMaterial::new_material(Iridescent::new(0.1 * 500.0, 0.9 * 500.0, 1.0, 1.5, 20)),
BVHMaterial::new_material(Iridescent::new(0.7 * 988.0, 0.3 * 988.0, 1.0, 1.5, 20)),
BVHMaterial::new_material(Iridescent::new(0.9 * 500.0, 0.1 * 500.0, 1.0, 1.5, 20)),
];
let dragon_vertices = obj.vertices.len();