Ben Sims
arycama.bsky.social
Ben Sims
@arycama.bsky.social
Senior Programmer.
Graphics, C++, C#, Shaders, Unity, Unreal, PC, Console, Mobile, cats.

github.com/arycama
mastodon.gamedev.place/@Arycama
twitter.com/BenSimsTech
A few other interesting highlights, uses my improved GTAO with the fix for the darkening issue, reworked screen space GI which helps significantly for foliage, especially after darkening introduced by GTAO. Finally, is also using the GT7 HDR tonemapper from a recent presentation.
September 1, 2025 at 2:10 PM
Final result is an array of input data for visible indices, but ordering of instances and data is preserved, so front to back sorting can be performed/maintained and multiple instance types can be culled/sorted in a single pass. Now to actually implement a parallel radix sort.
January 26, 2025 at 2:28 PM
At the end of the line above, I mask and bit shift each component by the required offset, so once they are bit or'd together, they are all occupying their own bits in the final integer.
January 24, 2025 at 1:48 AM
This was the code I was previously using, which I found online. It uses intrinsics to convert to fp16 and then does some extra bit shifting. It didn't quite seem precise enough for extents as objects would disappear towards the edges of the screen.
Might be slightly faster though
January 23, 2025 at 3:18 PM
I use this for storing compact bounds data for GPU-driven culling. I store world-space bounds as a float4, with .xyz being the world space bounds center, and .w being the bounds extents packed into an R11G11B10. It's unsigned and precision isn't super important, so it works well.
January 23, 2025 at 3:18 PM
Let content creators have control of storage and monetisation. They could self host with no ads, or pay for cloud storage, and either use ads or just fund it themselves. No reason to pick a one size fits all solution. As long as the end user can browse all channels in one place it should work.
November 8, 2024 at 7:24 AM
Code isn't the nicest, but GPUs don't mind too much these days. 😅

Some terms could be pre-calculated if needed.
November 2, 2024 at 5:55 PM
I adapted it for use in my above-water importance sampling (Which previously did not account for light angle or increased attenuation with depth) and the result is less variance for the same sampling cost. (A bit more ALU to calculate distance+pdf though ofc)

Both images are 1 sample per pixel.
November 2, 2024 at 5:53 PM
Thanks! Your response made me think of a different way to write the integral, and I plugged that in and got a closed form solution: lx(exp(-ca/l)-exp(-c(lx+b)/l))/(c(b+lx-a))

(Left pic is numerical integration, right is analytical. Also handles large distances (eg far plane))

Now to invert it 😅
November 1, 2024 at 8:57 AM
Interesting, will take a look! I tried GPT as a last resort lol but the equations it gave me did not match the integral. (They were close in some spots but far off in others, especially with certain parameters). It even acknowledged it was wrong and tried to blame numerical integration accuracy lol.
November 1, 2024 at 5:07 AM
As a side-note, I wish there was some way to use Mathematica for one-off solutions.. like "Pay to use for one hour" or "Pay for a certain number of equations" or something. It's really useful when I need it, but it's not common enough to justify a license.
November 1, 2024 at 4:22 AM
used for importance sampling. (Eg you calculate shadows, proper depth, or shoot a ray from sample point if using raytracing)

Have run into this problem with sky rendering too however, an analytical solution does not exist. So had to generate a lookup table. Could do the same here if needed.
November 1, 2024 at 4:21 AM
This gives the amount of "luminance" from a light source over the path from viewer to pixel underwater, assuming the water surface is a flat plane and water density is constant. (Both are reasonable assumptions for calm water)

Analytical solution can be used directly for rendering, or inverted and
November 1, 2024 at 4:20 AM
Haha, yeah that's kind of how it feels. Though tbh I spent the last 6 months doing house repairs+renovations and hobby-dev was a bit less of a priority, but now that's all done, so hoping to get back into it a bit more, and hopefully try to write down some of my findings for others to learn from!
October 25, 2024 at 3:46 PM
Not yet. Been meaning to find more time to finish setting it up, maybe this weekend. Anything in particular you'd be interested in? Was thinking about writing up some info about imposter baking+shading that I haven't been able to find much info on. (Most info is very surface level)
October 25, 2024 at 1:03 AM