@lisyarus@mastodon.gamedev.place
@lisyarus@mastodon.gamedev.place avatar

lisyarus

@lisyarus@mastodon.gamedev.place

He/him

I live in a totalitarian state, teach computer graphics, and make videogames

Check out my cozy traffic simulator: https://store.steampowered.com/app/2403100/Costa_Verde_Transport_Department/

This profile is from a federated server and may be incomplete. Browse more on the original instance.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Visualizing the number of visited & intersected BVH nodes makes the structure of a BVH clearly visible, neat

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

I clearly underestimated how important a good BVH is! Switched from naive to SAH building algorithm and now it's doing ~25 samples (~100M rays) per second.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Managed to hack together a BVH and render this 10k-vertex Stanford bunny. At 1k resolution it takes several seconds per sample, so I guess I'll focus on optimizing that.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

So I was accumulating Monte Carlo samples using good old blending here, now I've switched to a compute shader explicitly blending into a storage texture and it is ~10x slower, interesting

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

So I messed with it a little and it seems that the storage texture itself isn't a problem (writing random values to it works with ~200 fps). Seemingly the core loop over the scene geometry is slower with compute. Interestingly, max ray depth doesn't affect the performance, as if it's prefetching all the data and then looping over it cached.

#gpu and #graphics folks, does anybody have a clue what's going on? This is wgpu-native, btw.

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@demofox @BartWronski
(sorry for the ping)

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@demofox Almost! There's no extra texture in the second case, just a read - blend - write sequence in the compute shader with the same texture I was previously blending to.

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@demofox @BartWronski Jesus f****** Christ, that's exactly what I was doing. Thanks you so much! :) It even runs 15% faster now!

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

Nevermind, I was just incredibly stupid: https://mastodon.gamedev.place/@demofox/112350078834348618

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

GPU Monte Carlo path tracing goes brrrrrrr

This looks much smoother in reality, I had to massage vsync to prevent tearing when recording this

video/mp4

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

It's not much, but this simple Cornell box is raytraced directly in a fragment shader ^_^

It renders at 240 fps, while a 100k-vertex Stanford bunny renders at ~4000 fps using usual rasterization. It's just wild how good GPU's are at rasterizing

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Ok, I have some basic scene loading & rendering, fetching colors directly from a material buffer

Everything ready to start doing some raytracing :3

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

Soooooo guess what project I've decided to do next

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@slembcke Now that I think of it, your guess sounds like the obvious answer 😅

But no, I'm gonna try some software raytracing

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

GPU folks, say I'm writing a bare-bones non-realtime GPU raytracer (in compute, w/o rtx kernels). Does it make sense to store geometry as non-indexed, to skip fetching triangle data and fetch vertices directly?

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@demofox Thanks! I was wondering if I'm missing something obvious.

The only per-triangle data I have is probably the material ID, but I can easily store it in a separate buffer.

narain, to random
@narain@mathstodon.xyz avatar

Hey @lisyarus, I was going through your blog and saw that in your 2D soft-body physics engine post (https://lisyarus.github.io/blog/posts/soft-body-physics.html) you wrote about a technique you derived:

"I don't know a well-established name for this, and a quick google search failed to reveal anything of releavance, so I will call this method /shape matching/. If you know some resources on this, I would love to know them, since I had to derive all the equations myself :)"

Good news: it's literally called shape matching! https://matthias-research.github.io/pages/publications/MeshlessDeformations_SIG05.pdf

(P.S. I know your post is almost a year old, so I'm sorry if someone else has already told you this)

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@narain Interesting, thanks! Yep, just a few people mentioned it, so the more confirmations I have, the better :)

It's interesting that the article you linked uses a different algorithm for 3D shape matching compared to mine, but it is also iterative in nature.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

New blog post: Demystifying multiple importance sampling

It is a simple thing that turns out to be confusing to a lot of us rendering engineers. I try to explain it in detail here with path-tracing examples!

https://lisyarus.github.io/blog/posts/multiple-importance-sampling.html

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@demofox @andrewhelmer47 Ohhh wow, thank you both! ^_^

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@j_bertolotti @lesley Tbh I don't like this practice - it clutters formulas way too much. From my experience, this is rarely done in in math literature.

You still have to remember which variable means what, so remembering what is a vector and what isn't doesn't seem like it changes that much.

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@j_bertolotti Well, as @lesley said above, the notation is actually standard in graphics literature.

lisyarus, to random
@lisyarus@mastodon.gamedev.place avatar

I've completely remade my blog! Changed the design, improved the look of formulas, fixed broken links and typos, etc.

I was thinking of making a thread with my favourite articles, but that would be about a dozen of them, so I'll just drop the blog link here :)

https://lisyarus.github.io/blog/index.html

lisyarus,
@lisyarus@mastodon.gamedev.place avatar
lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@lesley Thank you! Here's the RSS feed link

https://lisyarus.github.io/blog/feed.xml

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@jonikorpi Yep, it doesn't look that great on mobile. I wanted to work on it but decided I'm a bit tired of CSS for now :)

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@curved_ruler @jonikorpi I'm using mathjax, and indeed the script is downloaded from cloudflare.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • tacticalgear
  • magazineikmin
  • modclub
  • khanakhh
  • InstantRegret
  • Youngstown
  • mdbf
  • slotface
  • thenastyranch
  • everett
  • osvaldo12
  • kavyap
  • rosin
  • megavids
  • DreamBathrooms
  • Durango
  • tester
  • ngwrru68w68
  • vwfavf
  • ethstaker
  • cisconetworking
  • GTA5RPClips
  • cubers
  • normalnudes
  • Leos
  • anitta
  • JUstTest
  • All magazines