@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.

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

How would you write what vertex the cursor points to on a heightfield terrain?

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@curved_ruler My go-to solution is usually a quadtree with each node storing (min,max) height in this node, and then raymarching it, entirely skipping a node if the ray doesn't intersect the node bbox.

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@curved_ruler Btw even without a quadtree, raymarching a grid directly is extremely fast, and you can get away with it for average-sized terrains.

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

Another weird raytracing bug! The black patches on the border are expected - these are artifacts due to having an extremely low-poly metallic surface with interpolated normals.

The white circles, however, are probably some funny floating-point business

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

Implemented a proper brdf (Cook-Torrance + GGX) and vndf sampling, now I can do some nicer materials! Here's a shiny ball and a golden dragon:

image/png

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@rreusser Hmm, I don't know of any!

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@llemarie Thanks! Well it's already using a BVH and it's capable of fairly large scenes, but it will be a bit slow on very large ones. I don't think I'm gonna do anything about it, though. Do you have some particular optimization in mind?

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

Oh no, there's some weird bug in the raytracer (this should be a fully smooth diffuse sphere)

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

Ah, that was the good old "missed one normalize call somewhere"

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@curved_ruler Yeah it's the WGSL equivalent of ternary if :)

j_bertolotti, (edited ) to random
@j_bertolotti@mathstodon.xyz avatar

Linear algebra is easy.
Just remember that real numbers are vectors, polynomials are vectors, integrable functions are vectors, matrices are vectors, tensors are vectors, and so on.
As I said, easy.

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@j_bertolotti Also you can form tensors from any kind of vectors. So you can do things like f(x)⊗g(y) :)

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

Science toy for today -> Evolution by Keiwando.

Draw the bones and muscles for your stick-figure creatures, and evolve them into better racers. Free and available on the web.

https://keiwan.itch.io/evolution

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@testtubegames Very cool! I've once made a similar thing but with a simpler physical model (joints themselves could produce torque), the most successful creature was a 40-leg caterpillar :)

efi, to random
@efi@chitter.xyz avatar

can I have some very slow-paced RTS in 2D, plz?

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@efi Industry Giant 2 was my favourite in childhood!

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@efi It also has a sick main menu music

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

Instead of optimizing the BVH traversal, I decided to implement multiple importance sampling. Right now I'm just iterating over all light-emitting triangles to compute MIS weights, later I'll probably add a separate BVH for them.

Obligatory "with/without MIS" image, rendered with just 64 samples:

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

I managed to fix the GPU hanging issues but the "optimized" BVH traversal in compute shader still works slower than the unoptimized one 😭

In other news, I tried the Möller–Trumbore ray-triangle intersection algorithm, and it too turned out to be a bit slower than my extremely direct algorithm that just solves a linear system:

image/png

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@mmby Yep, that was my thinking as well! I guess this algorithm benefits more on the CPU than GPU.

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

Third day debugging GPU workgroup atomics to squeeze more perfomance from my raytracer, but it still hangs :(

Here's a cool debug visualization though :)

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

Here's another fun viz. This one is especially cool because you can directly see the GPU warps (little 8x4 pixel blocks) as opposed to workgroups (which are 8x8 here)

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@efi Neither do I tbh, none of the pictures I got corresponds to my understanding of what's happening

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@kingsamj I've no idea! :D
I was debugging the CPU hanging, messed up with atomics and barriers, and somehow warps showed up

Tbh I expected to see per-pixel unique values and not warps...

eniko, to random
@eniko@peoplemaking.games avatar

i dont understand achievements. i dont understand why the act of playing literal video games needed to be gamified

note: please don't explain achievements to me. it will not help me understand, it will only annoy me

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@eniko I know many people who love them. I usually don't care at all. The only interesting thing is comparing your achievements to others, e.g. in Steam. Not as in "haha I'm better than you", but just seeing how many players reached a certain point in game, and comparing it to my own feeling of how difficult it was to reach it. Maybe it's just my inner game designer analysing stuff, though :D

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

@lisyarus Currently reading your post on MIS. It is a bit confusing to read because I don't see any image separators, or "image on the right" 😅

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@vincentp Ah, damn, I thought I've fixed them 😭
Does reloading a few times help?

lisyarus,
@lisyarus@mastodon.gamedev.place avatar

@vincentp Yeah I've heard many times that my blog works real bad in Firefox. Maybe I should finally download it and try to fix these issues....

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

Made quite a few optimizations to my WebGPU pathtracer:

Ordered BVH traversal: 15 -> 19 FPS
Store vertex indices instead of triangle ID's in BVH: 19 -> 20 FPS
Don't use indexed geometry: 20 -> 24 FPS
Separate vertex positions from other attributes: 24 -> 27 FPS

Not bad

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

@theWarhelm I'll add that sometimes the probability isn't actually known, and in this case you can't use the method for Monte-Carlo. E.g. in smth called "sampling importance resampling" they generate N samples with distribution P and select one of them with some weights to approximate some other distribution Q. When N=1, you get the original distribution P. When N -> infinity, you get Q. In the middle, you get some distribution with pretty much unknown probability.

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