guycalledfrank.bsky.social
Graphics programmer, indie game developer.
Developed Bakery (a GPU lightmapper) and some other tools.
Ex-PlayCanvas engine dev.
Working on Faded: https://linktr.ee/fadedthegame
Other stuff: https://ndotl.wordpress.com/cv/
50 posts
914 followers
80 following
Regular Contributor
Active Commenter
comment in response to
post
Damn, that's a good point
comment in response to
post
I'm just removing the sun from the texture and replacing it with a directional light 😅
Often you need to separate it anyway - e.g. supersample its shadows for better quality, output a mask to mix with other shadow algorithms, etc...
comment in response to
post
Why can't you use hardware interpolation?
I often store my lighting in 3D textures as SHs, but even for L1 you need at least 4 coefficients (I use 3 RGBA16 textures)... with this technique it'd be 6 textures instead of 3. But if you only store one flat color, I guess it's OK.
comment in response to
post
Huge thanks to nvidia for compute-sanitizer that debugs this stuff. Without it I would bang my head against the wall for a few more days...
comment in response to
post
Woah. I've only worked with DX11 before CUDA, and even though you can manage to crash the driver sometimes by doing out-of-bounds stuff, it never spilled the writes over... I think I read somewhere that drivers add some bounds checks to the microcode. I guess you can skip it on 12.
comment in response to
post
It does leak, yeah. I solve it by only using this technique in a specific large open area of my game where it's not really visible 😂
comment in response to
post
It IS possible to take objects into account, if you have them voxelized, but I feel like the downsampling nature of the process won't give enough precision... and then it needs to be more like radiance cascades instead.
comment in response to
post
It doesn't even have proper occlusion, so objects aren't integrated. Lights are. To fake some occlusion, I just use baked world-space bent-normals:
comment in response to
post
(The whole thing is around 0.5 ms on my 4070)
comment in response to
post
Pics
(also wtf with bsky not supporting h264 videos?)
comment in response to
post
Although there is a fun little thing about light beams, where their starting part is just a cone mesh with raymarching inside, and the ending part is fully froxels. Not sure if anyone tried it, but it's a trade-off between having sharp shape near the source and proper alphablended object fogging
comment in response to
post
I didn't invent these techniques, I merely understood them and had the time to apply them 😅
comment in response to
post
Every family in Rus/Ukr/Bel had relatives who died because of it.
What a bad take, @tomforsyth.bsky.social
comment in response to
post
True. I love froxels for many reasons. But how many voxels in either direction is reasonable to represent narrow beams of lights without aliasing before it gets impractical?
Also thinking of something hybrid (trace high-freq narrow cones / froxelify low-freq)
comment in response to
post
Wait, what device do you use for that?
comment in response to
post
The only thing missing from Tiny Glade is seeing some characters (except sheep) live in what you've built, I think it would be super cool 🥺
comment in response to
post
Currently mine are either just bumpable or static-but-breakable into bumpable parts
comment in response to
post
Yes, exactly. But it's kinda nice, because it "feels" like you're hitting something hard, and you can even reduce this velocity depending on how firmly the object was attached before breaking loose.
(I can't use RB with an existing mass for e.g. a sign post, it shouldn't move, only break)
comment in response to
post
I keep breakable objects with a single kinematic RB (so there's only one OnCollision event, no matter how many colliders it's made of), do this code on the vent, remove the kinematic and add actual dynamic RBs to the broken parts
comment in response to
post
I played with breakable objects yesterday and found that I also didn't properly solve the hit-by-rigidbody vs hit-by-static case either 😂
Hitting objects with something works fine, but throwing an object and letting it break is a different story
comment in response to
post
Now I'm thinking maybe the first line is wrong, since the pre-patched car velocity could be in the opposite direction (bouncing off the object), but I didn't see it because the car would punch the objects next frame
comment in response to
post
Actually not, since it happens in OnCollisionEnter, and car velocity is already reduced. Still, I set
partRb.velocity = car.velocity
and also later (more important)
car.velocity = collision.relativeVelocity
...to prevent the car from stopping at the object before it has physics enabled
comment in response to
post
Funny story: Journey had no automatic shadows. I painted them all by hand. The shadow texture was not hi-res. To get the iconic sunset columns to cast sharp shadows, I made sure that they aligned with the pixel grid of the texture. Here you can see the shadow map I painted.