@absulit@mastodon.social cover

Code and Art

#webdev #webgpu

This profile is from a federated server and may be incomplete. View on remote instance

@absulit@mastodon.social avatar absulit , to random

So I was trying to implement ping-pong buffers in my library (emphasis on trying). The code has no errors, but the values are not changing, and I think is basically how my library is built because I think (because I couldn't figure it out) the entries are being swap twice or not being swap at all and am tired, but I have another idea to test.

@juretriglav@mastodon.social avatar juretriglav , to random

Making a implementation of Lucas Alber's Markov Chain Path Guiding GI paper

Demo of real-time GI, walking through a hall, changing light parameters

absulit ,
@absulit@mastodon.social avatar

@juretriglav amazing!

@absulit@mastodon.social avatar absulit , to random

Last year, I was working with agents before this new "boom". I was really amazed by it and the opportunity that only I seemed to recognize on my team.

All that faded away as soon as you realize these agents behave like little kids that provide a non deterministic answer each time; and to answer my PM the question "why this doesn't work all the time?" with "IDK" was not enough.

absulit OP ,
@absulit@mastodon.social avatar

I think the hard part for me as a developer is to explain to non tech staff in a company why this that seems to spit out coherent results is not good enough. Even now it's hard to put it to words, but all I can say is that the ones who know (something, any subject) can't explain it because we don't have the intermediate language for it

absulit OP ,
@absulit@mastodon.social avatar

I heard once that the best people to explain something are the ones who recently learnt a subject. I think the longer the time it passes those mental connections to regular language vanish and a concept can't be explained, it can only be "thought", and you might end up explaining something in jargon

absulit OP ,
@absulit@mastodon.social avatar

My point here is that, only experienced developers know letting AI touch everything is a bad idea, but we are so knee deep into the waters of code that we can't explain why, but I do have an analogy

absulit OP ,
@absulit@mastodon.social avatar

Years ago I was working on a Python project. That was the backend of an Angular project. I finished my part and I was done, but higher ups decided to move me to the Angular side I didn't know anything about. My coworker knew a great deal of it so I used him as my search engine, I asked him everything, and why not if he was just there. This was nice and all until one day he was gone because he resigned a month before

absulit OP ,
@absulit@mastodon.social avatar

So now I was in a project I barely knew the stack and my information resource was gone... I learned my lesson and decided to never rely again later on coworkers about a project...

I never felt that feeling again except when I started to work with AI agents... you feel a dependency, you feel like you can't do it without it, you feel like you are not enough. But you are.

So when tragedy strikes and it will, it could be a crash on the Prod app or your coworker resigns... you have to be ready

absulit OP ,
@absulit@mastodon.social avatar

Don't rely on an external agent, being that a human or a to do your work, because in the end it is you who are responsible.

@absulit@mastodon.social avatar absulit , to random

Tomorrow is the Presidential Election in

If we elect wrong, we may have our own next four years of .

absulit OP ,
@absulit@mastodon.social avatar

welcomes its FA phase after its FO

@absulit@mastodon.social avatar absulit , to random

For the new version of POINTS I'm adding a way to load an HTMLElement as a texture. I think it's a simple way to load a weird font asset without an atlas/spritesheet. Or basically anything in the DOM.

Top Left: HTML
Below: texture in the canvas.

https://github.com/Absulit/points

ALT
@absulit@mastodon.social avatar absulit , to random

I can not wait for the IDE project to get better, so I can get rid of

ICYMI: Fresh runs in the terminal

https://github.com/sinelaw/fresh

ALT
@absulit@mastodon.social avatar absulit , to random

Another experiment with my POINTS library. This is basically an old physarum/slime demo I made a while ago, but rebuilt with compute shaders, particles and a lot more efficient than before.

absulit OP ,
@absulit@mastodon.social avatar

The idea of the physarum is that the particles leave a trail and are capable of following trails from other particles if the trail is stronger than the other particles, so they eventually follow each other.

The cool thing about this concept is that you can make the particle follow other things rather than the trails, like in this case a video.

The particles have two options: spawn from the center or spawn randomly, and this changes a bit how the video is interpreted.

@absulit@mastodon.social avatar absulit , to random

It would be so funny if a future release of is actually a distro with on top

@absulit@mastodon.social avatar absulit , to random

With the new version of my WebGPU library POINTS v0.6.0 (https://github.com/Absulit/points), I added a bunch of new features like support for depth maps, cameras, bloom and others, so I wanted to make a demo that used all of these.

Oscillating particles that move up and down like waves, some are emissive, and the camera zooms in and out.

absulit OP ,
@absulit@mastodon.social avatar

This demo has a 262K+ instanced particles (cubes) animated in compute shader, movement driven by a noise texture, it uses the depth map to create a slight depth of field and also some particles are emissive and to make the effect complete it has some bloom that affects only the bright particles, this thanks to the HDR output that allows those cubes to have a brightness beyond white and then those values are tonemapped to fit in the final output.

absulit OP ,
@absulit@mastodon.social avatar

All of this and running smoothly without losing any frames. This is the current state of graphics on the web.

@absulit@mastodon.social avatar absulit , to random

I also updated my POINTS library a couple of days ago to v0.6.0 (and a fix in the queue) with depth maps/shadow maps, bloom, wireframes

https://github.com/Absulit/points

The image is from a personal demo I'm currently working

ALT
@absulit@mastodon.social avatar absulit , to random

I think I understand better compute shaders than before. A thing that still eludes me is the fact that, even when I know I have 1 million particles, they are not all visible, even when I thought that was the case. I'm not entirely sure what it is, (not an expert but I manage to) it could be some sync issue related to random numbers, like it generates the same value and the particles overlaps

absulit OP ,
@absulit@mastodon.social avatar

I have this very clear demo with a lot less particles than a million, and it looks like it has more that the million one.

Also the workgroup sizes are different so that might be related.

I will check this later.

@absulit@mastodon.social avatar absulit , to random

Installing ; removing it immediately after a notification that it installs an feature.

The only reason I don't uninstall is because I don't want to learn

The trash is everywhere.

@absulit@mastodon.social avatar absulit , to random

I guess is calling me

@absulit@mastodon.social avatar absulit , to random

Discovered a silent bug in my WebGPU library while creating/updating a demo:

I usually create textures that copy and preserve the render pass output for future render passes to use, but for some reason never created one to read from the pass 0.
Internally a check verifies this index or if it doesn't exist to add the current pass data; so technically if the pass is 0 it will add the next pass data into it, you want it or not.

absulit OP ,
@absulit@mastodon.social avatar

This is the line in question:

!texture2d.renderPassIndex

I love falsy values, I love them because I love the idea of something being 0 equals null (like other programming languages like PHP and C) but every once in a while, a little surprise like this one shows up.

That being said, I wouldn't use Typescript for this. I still don't like the idea of "compiling" in an environment that is interpreted (the web).

absulit OP ,
@absulit@mastodon.social avatar

Anyway the issue is fixed by checking if it's also zero, so that's it.

EOL

@absulit@mastodon.social avatar absulit , to random

So, I created a one time click url in a website (custom website) and I wanted to test it with a friend via , and he told me the url didn't work.

I shared the url fragmented so the url is not clickable, but then he can copy and paste it and it worked.

My is, does Discord is scanning / clicking all the urls?

absulit OP ,
@absulit@mastodon.social avatar

@thomashelzle ok thought the same, but it didn't happen on WhatsApp. I didn't test further 🤪

@absulit@mastodon.social avatar absulit , to random
@absulit@mastodon.social avatar absulit , to random

I'm adding Render Bundles to my library.

I was not aware of the fact if there's video (which I do have sometimes) it then needs to be updated.

I created a bindgroup just for video, but then it cascaded to the fact I need a new pipeline just for this, and if I do that I need to have another set of shaders or a way to separate/remove/move the bindings from the other pipelines to the others (I think) and it's quite late and I don't want to do this.

Solution: recreate bundle if video.

ALT
absulit OP ,
@absulit@mastodon.social avatar

@tojiro Out of curiosity, is there a link where I can read about this?

absulit OP ,
@absulit@mastodon.social avatar

@tojiro thanks Brandon. Taking a quick look I see I might not understand everything because it seems to be lower levels (because of the jargon) from what I am used to, but I will try and will get back to you. Maybe I will need a bit of help trying to understand but I will let you know.

absulit OP ,
@absulit@mastodon.social avatar

@tojiro OK I've finally taken a look at this. Had to use some Copilot to understand a few things and match with my particular case with video.

So let me know if this is correct. With your proposal you can just kind of "plug" a separate bindGroupLayout, and use a specific binding, is that correct? So in my case I would have a new bindgroup and bindgrouplayout with the video reference, and then in the bundle I say: use group X

absulit OP ,
@absulit@mastodon.social avatar

@tojiro and THAT one is the only one that will be updated dynamically

absulit OP ,
@absulit@mastodon.social avatar

@tojiro that sounds really good if it gets implemented

@absulit@mastodon.social avatar absulit , to random
@absulit@mastodon.social avatar absulit , to random
@absulit@mastodon.social avatar absulit , to random

Tested on on Linux Mint. Those were a beautiful 2 seconds.

(it crashed)

@Vandacorp@aus.social avatar Vandacorp , to random
absulit ,
@absulit@mastodon.social avatar

@Vandacorp amazing. Nice shot.

@absulit@mastodon.social avatar absulit , to random

Instancing demo with several Stanford's Lucy models textured. It uses a depth map to create a somewhat cheap depth of field, blurring the output in the distance.

An array of angel statues with a custom texture. Camera moves around them. Further away it looks out of focus.

@absulit@mastodon.social avatar absulit , to random
@absulit@mastodon.social avatar absulit , to random

Sometimes updating my library is a set of paranoid steps until I make it work.

Only one line modified? That's a commit.

@absulit@mastodon.social avatar absulit , to random
@absulit@mastodon.social avatar absulit , to random

This is a recreation of an old particles demo I made for a AFrame / 8th Wall but in WebGPU. In this case also using instancing I'm creating a burst of particles (cubes) that are removed after a while. The shader is shared on all the cubes and that's what makes the gradient be so uniform across all of them. With a click of a button the shader can be modified and switch from a flat to a Lambert shading.

Particles made out of cubes that simulate a burst similar to fire; the colors start red on the base and end with yellow at the top. The particles start small, grow and then vanish becoming small again. Shading changes from a flat coloration to one with actual shadows.

@absulit@mastodon.social avatar absulit , to random
@WorkWithKirk@mstdn.social avatar WorkWithKirk , to random

Nature abhors a vacuum. But sometimes She fills it with flowers. Honesty, I could not have done this on purpose if I tried.

ALT
absulit ,
@absulit@mastodon.social avatar

@WorkWithKirk collect the seeds!

@sundogplanets@mastodon.social avatar sundogplanets , to random

A huge flock of sandhill cranes flew over while we were digging potatoes this afternoon. I am a bit sad about the birds leaving and winter coming, but I am also very full of potatoes now so that makes it a lot easier to cope.

ALT
absulit ,
@absulit@mastodon.social avatar

@sundogplanets that is so lovely