Tweak compile configuration and presentation example
This commit is contained in:
parent
6e57187e3a
commit
ee39d9d631
4 changed files with 16 additions and 9 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
|
|
||||||
[build]
|
[build]
|
||||||
rustflags = ["-C raget-cpu=native"]
|
rustflags = ["-C", "target-cpu=native"]
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
[workspace]
|
[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"]
|
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"
|
resolver = "2"
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
codegen-units = 1
|
||||||
|
lto = "fat"
|
||||||
|
|
|
||||||
|
|
@ -94,10 +94,11 @@ impl<R: Rng + 'static> ExampleScene<R> for MISTest<R> {
|
||||||
let area = light_offset * light_offset * 4.0;
|
let area = light_offset * light_offset * 4.0;
|
||||||
let material_offset = materials.len() as u32;
|
let material_offset = materials.len() as u32;
|
||||||
|
|
||||||
let color = match i % 3 {
|
let color = match i % 4 {
|
||||||
0 => Color::new(1.0, 0.0, 0.0),
|
0 => Color::white(),
|
||||||
1 => Color::new(0.0, 1.0, 0.0),
|
1 => Color::new(1.0, 0.0, 0.0),
|
||||||
2 => Color::new(0.0, 0.0, 1.0),
|
2 => Color::new(0.0, 1.0, 0.0),
|
||||||
|
3 => Color::new(0.0, 0.0, 1.0),
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
};
|
};
|
||||||
materials.push(BVHMaterial::new_light(AreaLight::new(color * 10.0 / area)));
|
materials.push(BVHMaterial::new_light(AreaLight::new(color * 10.0 / area)));
|
||||||
|
|
|
||||||
|
|
@ -39,12 +39,14 @@ impl<R: Rng + 'static> ExampleScene<R> for Presentation<R> {
|
||||||
|
|
||||||
let materials = vec![
|
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.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.8, 0.8, 0.8))),
|
||||||
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.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_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(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.7 * 988.0, 0.3 * 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.9 * 500.0, 0.1 * 500.0, 1.0, 1.5, 20)),
|
||||||
];
|
];
|
||||||
|
|
||||||
let dragon_vertices = obj.vertices.len();
|
let dragon_vertices = obj.vertices.len();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue