Squash of 25 work commits (Sep 1–12):237da90render: the sprite lane hands the screen draw back the way it found it895b9a7particles: an emitter can ride a body's own frame914471fai-hub: a feed session whose last socket left ends on its idle timeout; skin: parent, skinned centroid and a nodes-only rig for retargets3fcccf3sim: the whole world is implicitly editable, and one seam says where the ground is5692fabsim: the landform world proves itself — walker through the tunnel includedf4af6dfsim: terrain knows who changed it — a plan layer over player historyadbb078render: a water volume can be physics without a picturec17480frender: a non-rigid body may carry its own orientationacad401sim: an agent with no route holds and retries instead of walking into the wall22b2bf9sim + chat: the composed world surface takes a map floor; the chat gets plan toolsfaf8112web path: the tessellator's lap timer, the trace span and the fusion cycle timer have no clock on the webd3472ebtsdf: the clock-taking XR helpers are native-only — the browser has no depth camera and no Instant4946c9esim + render: a repaint is not a world edit — colour and glow restyles never rebake the lightmap4317f58sim + render + chat: walk decks as a surface, the filmed body is no obstruction, the brief never asks9791279render: support rigged models and custom materials across viewers3ce2792sim: use deck geometry for collision and sensing c8b79ff Add portable PBR, rig and soft-body authoring support 108d423 Add transactional polygon modeling and editable asset documents 38f4d3b Refine editable modeling and firm yarn character behavior 08a2637 sim: add entity-owned lights and vehicle headlights 00d96a7 render: add clustered lights, local shadows and incremental GI cf916af render: import glTF asset extensions and wire clustered GI c6d2cca model: cut transaction memory and raise capacity limits 41af47a raytrace: add a CPU probe-ray BVH budget example c963d0a libs: the game sim splits into makepad-scene and makepad-soft-body; render, model, fab and the asset importer retarget Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
28 lines
1.5 KiB
Rust
28 lines
1.5 KiB
Rust
//! Release-only probe-ray baseline, not an end-to-end GI or Quest benchmark.
|
|
use makepad_draw::*;
|
|
use makepad_raytrace::{building::building, bvh::{Bvh, Tri}};
|
|
|
|
fn main() {
|
|
for (floors, bays) in [(1, 2), (4, 6), (8, 10)] {
|
|
let scene = building(floors, bays);
|
|
let tris: Vec<_> = scene.indices.chunks_exact(3).map(|i| {
|
|
let p = |i:u32| { let p=scene.positions[i as usize]; vec3f(p[0],p[1],p[2]) };
|
|
Tri { v0:p(i[0]), v1:p(i[1]), v2:p(i[2]) }
|
|
}).collect();
|
|
let build = std::time::Instant::now();
|
|
let bvh = Bvh::build(&tris);
|
|
let build_ms = build.elapsed().as_secs_f64()*1e3;
|
|
let rays:Vec<_>=(0..2048).map(|i| {
|
|
let origin=vec3f((i%17)as f32*0.6-5.0,1.2+(i%floors)as f32*3.6,(i%11)as f32-5.0);
|
|
let y=1.0-2.0*((i%64)as f32+0.5)/64.0;
|
|
let r=(1.0-y*y).sqrt(); let phi=(i%64)as f32*2.3999632;
|
|
(origin,vec3f(phi.cos()*r,y,phi.sin()*r))
|
|
}).collect();
|
|
let start=std::time::Instant::now(); let mut hits=0; let mut invalid=0;
|
|
for _ in 0..32 { for &(p,d) in &rays {
|
|
let h=bvh.trace(std::hint::black_box(p),std::hint::black_box(d),40.0,false);
|
|
hits+=h.is_hit()as usize; invalid+=h.truncated as usize;
|
|
}}
|
|
println!("triangles={} build_ms={build_ms:.2} 2048_probe_rays_ms={:.3} hits={hits} invalid={invalid}; CPU intersections only, no lighting/shadow queries/upload",tris.len(),start.elapsed().as_secs_f64()*1e3/32.0);
|
|
}
|
|
}
|