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
Just some mildly moody screenshots from the thing that I'm trying to make into a thing. Also pictured: rewritten gpu driven foliage, terrain and grass renderers. Writing a device radix sort was fun-ish.
Currently reworking the terrain shader, needs better height blending.
September 1, 2025 at 2:10 PM
Shaders are fun. Sky+lightrays rendered together with 1 sample per pixel+temporal with importance sampling) Clouds+sky integrate with ambient probe and aerial perspective so environment light is cohesive.
End result is quite nice, only change between these pics is sun+view angle
May 8, 2025 at 5:41 PM
Simple multipass parallel prefix sum+stream compaction. First pass writes groups of 1024 scans and max value for each group. Pass 2 does a prefix sum on the group sum array to compute a final offset for each group of 1024 which is used as an offset for final pass write indices.
January 26, 2025 at 2:28 PM
It was difficult to find a simple, concise parallel prefix sum example online, even the GPU gems code was obscure and had bugs.
I wrote a simple one, only handles a 1024 array, but can be expanded to larger arrays with multiple passes.
Not the most efficient method, but simple
January 24, 2025 at 6:56 PM
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
Optimised (I think) HLSL for converting float3 to and from R11G11B10. Input values must be in range, doesn't handle -ve/denorms/nan/inf.
Handy for packing positive float3 data into a single uint.
Convert to+from is 21 DXC instructions.
Handy for packing 3D data into a single int
January 23, 2025 at 3:18 PM
Being part of a wall of death while Periphery played Blood Eagle was certainly an interesting way to spend a Thursday night lol

10/10 background art too
November 7, 2024 at 11:29 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
I made the hash functions to be able to easily hash from a 1D/2D/3D/4D seed value. But seems that I mixed them up from calculating 4 different hash values from a float4. I decided to rename the existing ones like so, less ambiguity. (And now the compiler will give me nice vector truncation warnings)
October 24, 2024 at 11:50 AM
Lol, well that explains it. Can anyone spot the bug?
October 24, 2024 at 10:50 AM
Welp, turns out I have a bug in my GPU random gaussian number generation. Can't believe this took me nearly 3 nights to track down. I started rewriting my entire iFFT algorithm from scratch.

These are the two renderdoc captures, one is much more... pink. My X and Z values were always identical.
October 24, 2024 at 10:44 AM
My ocean FFT does this in the corners, why does it do this in the corners? Does anyone know why it does this in the corners? It didn't used to do this in the corners.
I think the spectrum texture looks okay, displacement has weird pixels in the corners though.
Do I need to add an extra row/column?
October 22, 2024 at 10:50 AM
Anyone else done much work on shore waves using distance fields? I'm trying to come up with some nice equations using distance/direction/underwater depth, plus the wind speed+direction from the iFFT ocean spectrum. (Tessendorf Phillips spectrum for now). It's hard to find much info though.
October 20, 2024 at 3:37 PM
I have been working on something of the sort in Unity. Culling+lod selection+draw call arg generation done in a compute shader, then dispatched indirectly. Works well for rendering millions of trees etc. (Combined with GPU procedural generation)
One of the compute shaders:
github.com/arycama/Node...
October 20, 2024 at 3:19 PM
Might have to start posting here a bit, since Twitter is about to self-implode.

I do game-dev things, and graphics things, shader things. I recently updated my imposter baker/shader. Primary usage is for large amounts of foliage.

Having a few issues getting the normals to match up though!
September 19, 2023 at 12:17 PM