/BERGASMS/GAMES/002

..

06/03/26: 002

Discussion Link

I gave up coffee this week, probably a silly idea, but there you go. Also had a funeral for.. a sort of friend? I didn't know him super well personally but was well acquainted with him and got on with him really well when we did catch up, so that was sad. Anyway, in programming land, i've been working on having a compute shader i can run multiple times on an input to output set so that I can do algorithms like diamond square and suchlike. It also lets you run erosion deposition and other things. I've got the shader compiling and the data buffers attaching correctly and I can see the output, so now I need to run it repeatedly. I've been using a lot of one time submit command buffers, so I think the key is to make it a multiple time submit buffer and reset it. So that's what i'll do.

..coding happened here

It turns out autocomplete wasn't working for dependencies in my IDE (Nova). That's the fault of zls, although not really, because it's more that i live at the bleeding edge of zig and so sometimes things break. This is a bit frustrating and i tend to be conservative at work, but at home dealing with weird compiler and tool issues is a good way of keeping certain skills honed. Anyway, zvm makes it easy to keep up to date on the latest edge, and i did an update and now it all works again. Also my legs are cooking because my laptop had to work hard.

..coding happened here

A diamond square layer
So, that actually worked pretty well, sort of. I had to add some more helpers to allow for some more push constants into the shader, but in terms of recursively stepping through the algorithm worked kind of... if you look closely though there seems to be some sort of artefact lines, so i wonder if i am going a step too far or stopping a step early, i suspect the latter, time to investigate.

..days passed

I wasn't seeding the algo properly and i was also using the wrong image, so double fail. But now i have things working and the outcome is actually pretty nice. so this uses noise to seed, and then diamond square to smooth things out, which is actually a bit redundant but it looks pretty good.
looks nice and foggy and good
Next i think i want to do volumetric clouds, but, before i do that i think i want to add lighting to the fog layers. what i kind of want is for the top layer to illuminate sharply to the light source, and the lower layers to sort of dully light up. It should look pretty cool, maybe. So what this actually means is adding in materials, but properly, not just sort of hard coding stuff.