David Peipei

David Peipei

@davidpei.bsky.social

Real time Graphics Engineer working on Wonderland Engine. On the side I do WebGPU pathtracing and lightmapping ๐Ÿ’ซ in rust ๐Ÿฆ€ https://davidpeicho.github.io/about

54 followers34 following44 posts

Getting there. Example of a project where the camera movement is in user-land. User scripts in js, running on the web doesn't involve another indirection layer. #rust #webgpu #wasm

Trying to solve a fun problem. I am embedding quick-js natively in a rust app. I also have a wasm api to js. My goal: Expose the same api to web js and quickjs. But I also need to handle wasm memory views that are used throughout the API. I would prefer not to use wasi. Any idea? #rust #wasm

Rendering the amazing "Lone monk" scene by Carlo Bergonzini in Albedo (#rust #webgpu pathtracer). Scene export isn't perfect, speed isn't good enough, but pretty happy with the results already.

Really wish wasm-bindgen gen boilerplate code to write a struct from js to read into rust Wasm, without allocating an object or the need to free a pointer. * Give some pointer to temp memory * wasm-bindgen write the js objects (Pod fields) to pointer * Rust has access to the struct via the pointer

Looks like Chrome DevTools now include an "AI summaries for console messages". I wish I got natvis / LLDB formatters instead, which seems to be slightly more useful to debug WASM code ๐Ÿ˜…

Native vs Firefox Performance hit is clear in the web version. This scene is GPU bound, no CPU work and no CPU -> GPU flow. Weirdly, Chrome is barely usable compared to Firefox. #rustlang #webgpu

Rendering at 1/4 resolution to emphasize the fix: Left is bilinear upsampling, right is TAA upsampled. Not great for the reflections, but those will soon be fixed! #webgpu #rust

Added a sun based on Hosek Wilkie. Irradiance is pre-computed for the pathtracing NEE. The temporal lag makes changing the time actually kinda nice to look out. Nice artifacts, totally wanted :) #webgpu

Most of the noise from disocclusion is now gone. Reflections will be a pain to handle, looking forward to it ๐Ÿ˜ I waited too long for that, but I really need some mipmaps to get rid of the texture sampling artefact ๐Ÿซ  #webgpu #rust

Got some time to spend on the pathtracer denoiser. It's getting there, and the next step is to fix those disocclusion artefacts. I will start working more and more on this project, and share more info hopefully soon! #rust #webgpu

Just released a new version of github.com/DavidPeicho/... * Removes the "basic" API in favor of the "advanced" API provided by #tinybvh. * Unifies layouts build * Safer usage This version is API-breaking, but the library was still tagged as beta ๐Ÿ˜„ Will probably hit 0.1.0 soon this time!

github.comGitHub - DavidPeicho/tinybvh-rs: Rust wrapper for the tinybvh libaryRust wrapper for the tinybvh libary. Contribute to DavidPeicho/tinybvh-rs development by creating an account on GitHub.

Haven't been improving tinybvh-rs much lately, but catching up soon! Unfortunately, compiling a rust crate depending on tinybvh-rs is painful if you don't want to use emscripten. I just decided to not use tinybvh in wasm rust anymore, slowing down my progress on tinybvh-rs.

First time that I think that rust tooling needs some work: The WebAssembly support with a dependency in C++ is not yet nice to use. Using wasm32-unknown-emscripten also means not using wasm-bindgen

I have a #rustlang dependency building a C++ library. Want to compile my project to the wasm32-unknown-unknown target. I feel like I have no choice than making a wasm module out of the C++ dependency itself?

First post here! Continuing my journey on my #rustlang #webgpu pathracing library, fully GPU software, i.e., no RTX. TLAS + Texture atlas performance are slowing down the pathtracing quite a bit. Will need to focus on that after I get rid of more noise

You are up to date.