Generating Slope maps and Noise maps

You could try using only the first parameter for workgroup size and let the compiler/hardware figure it out. I think all cards are different for the actual hardware clusters of cores you get. I just double checked, nvidia uses 32 cores (nvidia term is warp) and amd uses either 32 or 64 (amd term = waves). Seems both will have 1024 limit for shared memory access between the warps or waves. Which explains why webgpu limits you to 1024. Tldr is, i think just use a single parameter for workgroup size of up to 1024 to make sure you arent idling cores. Maybe @Evgeni_Popov has some suggestions for best practice?

For cpu, Here is a way to stitch together multiple patches in workers. The gh pages are broken because shared array buffer, but it works. Its a pathtracer but the stitches logic is good for your needs i think? .https://github.com/01alchemist/as-smallpt/blob/69dfe1a3777fb339abff6616442c4f87c7254617/js/index.js#L71

Maybe u find this interesting also
GitHub - greggman/dekapng: Make giant PNG files in the browser , little helper to make even bigger images, lol

2 Likes