I Made Falling Sand Games in a Fragment Shader

Поділитися
Вставка
  • Опубліковано 5 січ 2025

КОМЕНТАРІ • 240

  • @Yusef28
    @Yusef28  2 місяці тому +17

    I'm glad this video (and my previous one) was so well recieved. I just wanted to quickly mention the code snippets I showed of my projects later on in the video are not meant to be an example of how you should code this. I basically hacked something together as proof of concept. It ended up being as fast as I needed but there are better ways of writing it.

  • @TodePond
    @TodePond 3 місяці тому +140

    nice sand
    but hey falling sand games never stopped being popular :)
    also sandspiel partly works on the gpu!

    • @akselrasmussen3386
      @akselrasmussen3386 3 місяці тому +4

      Hi todepond!

    • @Yusef28
      @Yusef28  3 місяці тому +17

      Thanks, I learned quite a bit from your videos. Well fair enough! And good to know about sandspiel.

    • @youngbloodbear9662
      @youngbloodbear9662 3 місяці тому +1

      I had a feeling id find you here lol, keep up the cool work TodePond

  • @ezyto
    @ezyto 3 місяці тому +56

    Dude that is the coolest camera effect I’ve ever seen, crazy unique!

    • @Yusef28
      @Yusef28  3 місяці тому +3

      Thanks, I'm really glad to hear that!

  • @WangleLine
    @WangleLine 3 місяці тому +98

    waahhhh I love this recent resurgence of falling sand games... I used to play them so much as a child

    • @jpgallegoar
      @jpgallegoar 3 місяці тому +2

      i loved the powder game

    • @cerulity32k
      @cerulity32k 2 місяці тому +3

      powder game and powder toy my beloved

    • @WangleLine
      @WangleLine 2 місяці тому

      @@cerulity32k Yeah!!!!! both of these were so peak

  • @spok_real
    @spok_real 3 місяці тому +24

    that final video effect was SICK

    • @Yusef28
      @Yusef28  3 місяці тому +5

      Ok nice I'm glad people are liking that one!

  • @bobsmithy3103
    @bobsmithy3103 3 місяці тому +88

    Thought this was going to be a generic falling sand vid, but at 2:46 you actually solved a problem i had. Cheers mate

    • @Yusef28
      @Yusef28  3 місяці тому +9

      Thanks for this feedback, and I see a number of people liked your comment as well. I'm glad my content is helping.

  • @Leafu0
    @Leafu0 3 місяці тому +3

    This is very cool, i love falling sand code and shader code but i never thought about how cool it would be to combine it like that

  • @SeanStClair-cr9jl
    @SeanStClair-cr9jl 3 місяці тому +45

    Dude that research paper section was awesome. Wow.
    Edit: HAHA AND THE BEES START EATING THRU HIS HEAD love it.
    Honestly as far as a rts strategy game goes I think u could so follow your original inspiration. Like, I would so play a game ABOUT specifically building up my bee colony in someone's attic so that it can ultimately crash down on their heads. But if you aren't smart about it, you might alert them to your presence early and get messed up by the exterminators. It can be all-out warfare.

    • @Yusef28
      @Yusef28  3 місяці тому +4

      Thanks for all the great feedback. You're right and that idea reminds me of a game called Sim Ant from the 90s. I'll keep this idea in mind!

  • @bismth
    @bismth 3 місяці тому +28

    You’re awesome. Your ascii render system gave me a great idea for a game and once i get a couple CS classes under my belt, i’m gonna try and bring it to life

    • @Yusef28
      @Yusef28  3 місяці тому +6

      Excellent, I think it's great that you already have a project idea in mind while starting CS. That's the best way imo. Good luck with your studies and the game!

  • @FranzBiscuit
    @FranzBiscuit 3 місяці тому +24

    Love it, that is an extremely cool effect! Thanks for sharing your journey with us on this project. Kudos!!!

    • @Yusef28
      @Yusef28  3 місяці тому

      My pleasure!

  • @ludvigjansson5790
    @ludvigjansson5790 3 місяці тому +6

    thee aesthetic is so cooll, i love the magic hands ah scene, Really feels like that dark mysterious Inscription vibe 🤌

    • @Yusef28
      @Yusef28  3 місяці тому

      Thanks! That's the vibe I was going for.

  • @Sprunk0
    @Sprunk0 3 місяці тому +3

    You've got the most creative graphics programming videos ive ever seen, this is so fucking trippy, I love it

    • @Yusef28
      @Yusef28  3 місяці тому

      Thanks a lot!

  • @bearnaff9387
    @bearnaff9387 3 місяці тому +4

    That falling ASCII video effect is amazing. I can totally see someone using it for a Hollywood hacker or AI character in a movie.

  • @Hubcat_
    @Hubcat_ 3 місяці тому +16

    9:48 this looks like it could make an awesome boss arena, with the player on the platform and the sand video giant doing attacks

    • @Yusef28
      @Yusef28  3 місяці тому +1

      I think that's an awesome idea!

  • @fabimawn
    @fabimawn 3 місяці тому +9

    8:24: working in a huge Blender project with cycles enabled

  • @AdrianHereToHelp
    @AdrianHereToHelp 3 місяці тому

    Combining this with ascii characters was a really cool idea. I love the effect that creates

  • @Snort70
    @Snort70 3 місяці тому +1

    You've got something crazy good here man

  • @MarixEm
    @MarixEm Місяць тому

    thats really cool way to use the falling sand concept !

  • @IstasPumaNevada
    @IstasPumaNevada 2 місяці тому

    That falling sand video idea is really, really cool.

  • @sino_diogenes
    @sino_diogenes 3 місяці тому +7

    Usually I don't like most of the

  • @EvilStreaks
    @EvilStreaks Місяць тому

    Using that grid system to make the particles fall and roll off eachother is genius! It totally negates the need for IFs !!! You could just make a 1-domensional look-up array that only needs 4 bits to define it's indices and values! This has given me all kinds of optimisation ideas! Thanks for this.

    • @Yusef28
      @Yusef28  Місяць тому +1

      I'm glad it's given you ideas and thanks for adding yours as well!

  • @AB-wf8ek
    @AB-wf8ek 3 місяці тому

    This is awesome. I used to love playing around with sand games on my first smartphone almost 10 years ago.
    Looks like so much fun. Thanks for sharing!

    • @Yusef28
      @Yusef28  3 місяці тому +1

      I'm glad you enjoyed and oh yes these projects were a lot of fun

  • @NoiseCommander3DS
    @NoiseCommander3DS 3 місяці тому +1

    The effects look really cool, great work!

  • @peatral
    @peatral 3 місяці тому +1

    Damn the final video effects look really awesome!

    • @Yusef28
      @Yusef28  3 місяці тому

      This is great to hear, thanks!

  • @YaevidMusic
    @YaevidMusic 3 місяці тому +1

    Woahhh i gotta rewatch this when im less busy and program all the same stuff. Super cool!

  • @MesaCoast
    @MesaCoast 3 місяці тому +1

    That falling sand shader effect is crazy!! I'd be really interested in seeing this in a game

    • @Yusef28
      @Yusef28  3 місяці тому

      Agreed I'd like to see it in a game as well!

  • @heeho5495
    @heeho5495 3 місяці тому

    yaaay falling sand :D i love making these types of games, that camera effect is awesome too T^T

    • @Yusef28
      @Yusef28  3 місяці тому

      They are super fun! I'm glad you liked it!

  • @Temple_Cloud
    @Temple_Cloud 3 місяці тому

    Great video and research! I really enjoyed some of the effects you came up with. Super inspiring! Thanks for sharing.

    • @Yusef28
      @Yusef28  3 місяці тому

      Thanks and it's great to hear the research paid off!

  • @hiphyro
    @hiphyro 3 місяці тому +2

    this video did NOT go where I expected with that whole bee thing LMAO

  • @dzmvx
    @dzmvx 3 місяці тому

    your videos are simply fascinating, love ur content man keep up the good work :)

    • @Yusef28
      @Yusef28  3 місяці тому

      Thanks and will do!

  • @everychannelnameistaken
    @everychannelnameistaken 3 місяці тому

    This is sick. Great vid. Video-based falling sand is an awesome concept.

    • @Yusef28
      @Yusef28  3 місяці тому

      Thanks this is great to hear!

  • @MiliMes
    @MiliMes 2 місяці тому

    I've got to try this. Super cool video man!!

    • @Yusef28
      @Yusef28  2 місяці тому

      Appreciate it, and good luck with your project!

  • @Scanlaid
    @Scanlaid 3 місяці тому +1

    The Ascii sand was so cool! All I was thinking was "music video"
    I don't know crap about shaders, could you use audio to dynamically effect the rules?
    Like an equalizer, certain frequency bands could change various properties, like low kicks make the sand gravity reverse briefly so it adds thump to the visual? High frequency changing color, etc etc.
    If that was bundled with a frontend to make it easy for the user to tweak parameters, frequency bands, palettes, refresh rate, etc, I could see some money. Live Concert Visuals even let alone slick video edits.
    AND this is on an old laptop 🤯 Truly incredible stuff man, looking forward to more!

    • @Yusef28
      @Yusef28  3 місяці тому +2

      This is an excellent idea! yes you can make the sand reverse directions and you can drive that by audio so what you are imagining is totally doable.

  • @Akiruu_Sama
    @Akiruu_Sama 3 місяці тому

    Dude your videos ideas are awesome, I discovered you with the ascii shader. I am really excited for the next ideas

  • @kevevev
    @kevevev 3 місяці тому

    Love using an automata to describe falling sand, galaxy brain idea!

  • @andrewdunbar828
    @andrewdunbar828 2 місяці тому

    Awesome! Keep videos like this coming!

  • @genderender
    @genderender 3 місяці тому

    the ascii example was amazing! such a cool effect

  • @Xorkent
    @Xorkent 3 місяці тому

    This is the coolest thing ever! I'm into graphics and visual effects myself, so I might try to mess around with it and see if I get any wacky ideas!

    • @Yusef28
      @Yusef28  3 місяці тому

      Awesome I hope you go for it!

  • @Mykyta_Palamarchuk
    @Mykyta_Palamarchuk 3 місяці тому +1

    Man, you are something else. Such a simple concept but so many interesting things you managed to come up with and implement.

    • @Yusef28
      @Yusef28  3 місяці тому

      Oh great feedback thanks, I'll have to keep the ideas coming then!

  • @aiden_3c
    @aiden_3c 3 місяці тому

    I really like how the interaction between falling sand and water almost creates these pseudo air bubbles that rise up. Awesome emergent behavior

    • @Yusef28
      @Yusef28  3 місяці тому +1

      Oh yes I noticed this emergnet behaviour as well!

  • @TheLaughingPotatoe
    @TheLaughingPotatoe 3 місяці тому +2

    Hey Yusef! Really enjoy your videos! Keep up with the awesome work, Cheers!

    • @Yusef28
      @Yusef28  3 місяці тому

      Thanks, will do!

  • @MaximSchoemaker
    @MaximSchoemaker 3 місяці тому

    Very cool effect! 🔥✨

  • @finalforeach
    @finalforeach 3 місяці тому +3

    This is brilliant!

  • @galaxii0
    @galaxii0 3 місяці тому

    watched this & the ascii shader video, your style reminds me a lot of the sebastian lague coding adventures series which i love to see

    • @Yusef28
      @Yusef28  2 місяці тому

      Well I must be doing something right then, thanks for this feedback!

  • @0osk
    @0osk 3 місяці тому

    YOOOOOO using the webcam is such a good idea, that matrix effect is awesome

    • @Yusef28
      @Yusef28  3 місяці тому

      I'm glad you think so!

  • @Chrome_Cat
    @Chrome_Cat 3 місяці тому

    Awesome. Doing things in fragment shaders is a great restriction to inspire creativity. The Margolus Neighbourhood approach was genius!

    • @Yusef28
      @Yusef28  3 місяці тому

      Oh yes, and so far I've only been using shadertoy which is even more restrictive. and agreed about the approach!

  • @BarteG44
    @BarteG44 3 місяці тому

    Very interesting video all throughout. Great work man

  • @renegildo4408
    @renegildo4408 3 місяці тому +2

    oh, graphics programming is so cool man, great video!

    • @Yusef28
      @Yusef28  3 місяці тому

      Thanks and agreed its awesome!

  • @triq0
    @triq0 3 місяці тому

    this and the last video earned you a sub, keep up the experiments!

    • @Yusef28
      @Yusef28  3 місяці тому

      Great I'm glad you liked it!

  • @codinghuman9954
    @codinghuman9954 3 місяці тому

    THIS IS AWESOME!!! I do wonder about how useful it would be in an actual game though. The main problem I see is reading the pixels type on the cpu side for other game logic, it would take quite some time to send the data down and the weird update order might be harder to work with then traditional cpu based sand engines. But if you could get it to work it would certainty be WAY FASTER than the cpu!

    • @Yusef28
      @Yusef28  3 місяці тому

      Yeah I haven't worked that out myself either to be honest haha.t I know some games like Space Simulation Took Kit say they use the GPU for simulation so someone out there knows how.

  • @tankfire20
    @tankfire20 3 місяці тому

    The falling sand was cool. But that video effect was phenomenal. The artist inside of me went wild with ideas.

    • @Yusef28
      @Yusef28  3 місяці тому

      I'm glad to hear that! Yeah I went roughly in order of how I came to each idea so the video effect ended up being later in the video although it's one of the best for sure!

  • @tculig
    @tculig 3 місяці тому

    That was frikkin' sweet man! Looking forward to your next video!

  • @whattheheckisthisthing
    @whattheheckisthisthing 3 місяці тому

    Really neat. Good job

  • @ahahaha3505
    @ahahaha3505 3 місяці тому +1

    You have a gift for this stuff. IMO you should think about cinema. A collab with a documentary film maker for some suitably avant garde subject could be dynamite.

    • @Yusef28
      @Yusef28  3 місяці тому +2

      Oh thanks and yes I could totally see myself doing something avant garde so it's very interesting that you mention it.

  • @seapickels9087
    @seapickels9087 3 місяці тому

    so cool and so clever :)
    I gave up on gpu falling sand, its so much harder than other cellular automata like smoothlife

    • @Yusef28
      @Yusef28  3 місяці тому +1

      Well if you ever come back to it you have a method now. Smoothlife is awesome too!

  • @pepsidoggy
    @pepsidoggy 3 місяці тому

    very relaxing and informative, keep it up!

  • @ofeklivny
    @ofeklivny 3 місяці тому

    Amazing work

  • @RayznGames
    @RayznGames 19 днів тому

    Hey that was a lovely video! I am currently working in a video myself making a Sand Simulation system for Unity,. WIch runs fairly decently in the CPU, I want to say that it is amazing that you made this run in the GPU, and the wonderful trickery to improve the cells update logic with overlapping quads, One question, did the bees live as well within the GPU? I loved that, I Guess it would be complicated to integrate this into like collisions or triggers since the simulation lives in the GPU.
    I did as well use a bit of TheCodingTrain knowledge. I will add a reference to your video, in my doc since this was clear, as a GPU implementation, and cool to watch!

    • @Yusef28
      @Yusef28  14 днів тому +1

      Cool to hear you are also working on a falling sand project. haha yes the man always wondered why is screen was flickering so much. It was the bee's in the gpu.

  • @exzilorate
    @exzilorate 3 місяці тому

    It's awesome to see new falling sand projects and experiments being made. Great vid!

    • @Yusef28
      @Yusef28  3 місяці тому

      Glad you enjoyed it!

  • @tigranrostomyan9231
    @tigranrostomyan9231 3 місяці тому

    This is so great!

  • @shouse_zip
    @shouse_zip 3 місяці тому

    this is really awesome

  • @StainlessHelena
    @StainlessHelena 3 місяці тому

    This is so cool!

  • @mahomotion3474
    @mahomotion3474 3 місяці тому

    awesome video, good job

  • @blu3260
    @blu3260 3 місяці тому

    This would be a killer effect in a music video or something

  • @no-ld3hz
    @no-ld3hz 3 місяці тому

    I always wanted to try this out it in compute shaders, but I never really thought about fragment shaders which operate per pixel. Which makes a lot more sense! I might give this a try in my Vulkan engine some time!

    • @Yusef28
      @Yusef28  3 місяці тому

      Ok sweet I hope you go for it!

    • @no-ld3hz
      @no-ld3hz 3 місяці тому

      @@Yusef28 😭I spent 30 mins trying to get an additional 200 fps on a model renderer
      4.6k fps on debug builds isn't enough!!!!

    • @Yusef28
      @Yusef28  2 місяці тому

      I'm only seeing this now, since I wasn't filtering comments properly but that's a lot of fps!

    • @no-ld3hz
      @no-ld3hz 2 місяці тому

      @@Yusef28 I have put it down for now to pursue work. I eventually may come back to it however.

  • @ademdjek1253
    @ademdjek1253 3 місяці тому

    Wonderful stuff

  • @lilaa3
    @lilaa3 3 місяці тому

    you have a great voice for this stuff, this was really relaxing to watch! could you avoid the branching by having a LUT?

    • @Yusef28
      @Yusef28  3 місяці тому

      Thanks that's good to here about my voice. I haven't looked into any optimizations but I imagine LUTs could be one.

  • @rebane2001
    @rebane2001 3 місяці тому

    this is epic!

  • @lazy_P3
    @lazy_P3 3 місяці тому

    Really Cool :) 👍

  • @icedlava7063
    @icedlava7063 3 місяці тому

    this is really cool!!

  • @riantube
    @riantube 3 місяці тому

    Cool stuff, using similar techniques you could probably do anthill optimization or physarum simulations.

    • @Yusef28
      @Yusef28  3 місяці тому

      Oh yeah I could definitely see that!

  • @iammichaeldavis
    @iammichaeldavis 3 місяці тому

    The ASCII effect on your face was *unreal*

    • @Yusef28
      @Yusef28  2 місяці тому

      that's funny because initiallly I was against uploading a badapple on youtube at all but then recently just decided oh why not

    • @iammichaeldavis
      @iammichaeldavis 2 місяці тому

      @@Yusef28 I must admit my ignorance, I have no idea what a badapple is 😂 but that video effect was amazing, really just, stunning. Like something from Ghost in the Shell, or Neuromancer. You are super talented man

    • @Yusef28
      @Yusef28  2 місяці тому

      Oh I commented this under the wrong comment apparently, so my bad there. I'm glad you liked the ASCII effect though it's one of my favourites. Thank-you also for your kind words here too!

  • @kitsune_gt
    @kitsune_gt 2 місяці тому

    THE POWDER TOY MENTIONED

  • @KX36
    @KX36 2 місяці тому

    so much sand... you'll be finding it in your shoes for months.

  • @Starwort
    @Starwort 3 місяці тому +1

    So when can we expect to see Bad Apple on the sand video player?

    • @Yusef28
      @Yusef28  3 місяці тому

      haha well I thought about doing Bad Apple remakes and other smaller experiments on twitter or patreon but I'm not sure yet

  • @635574
    @635574 3 місяці тому +4

    I might have a good solution for fixing the chunkiness of falling particles, they need to check whether the particle underneath moved down the previous frame in the preferable direciron and if it did the particle above can move. That way you can have continuous streams. It won't always be visible which particle moves where but neither is real sand if they're homogenous color.

  • @aiden_3c
    @aiden_3c 3 місяці тому

    This is so cool

  • @TheosTechTime
    @TheosTechTime 3 місяці тому

    This is soo cool

  • @solitudesf8111
    @solitudesf8111 3 місяці тому +10

    graphics programmers do the coolest shit

  • @R74n
    @R74n 3 місяці тому

    sand 👍

  • @semplar2007
    @semplar2007 3 місяці тому

    8:20 - youtube compression: "AWW HELL NAWWW"

  • @ninjajakee
    @ninjajakee 3 місяці тому

    Yoo this shit is sick af!

  • @LanceThumping
    @LanceThumping 3 місяці тому

    I wonder if using the magnitude of motion vectors or some other technique that detects change/rate of change to set the lifetime of sand.
    Then something static will hang around but when it moves the screen will update more rapidly and sand will pour off and disappear rapidly with it.

    • @Yusef28
      @Yusef28  3 місяці тому

      oh yeah that could be really cool. I've put motion vectors on the list of things to look into since a lot of people are interested in that it seems.

  • @NicosLeben
    @NicosLeben 2 місяці тому

    The falling sand looks a bit weird because there is always one empty horizontal line every 2 pixels.

  • @ttimhcsnad
    @ttimhcsnad 3 місяці тому

    Great video! Definitely solved a problem that I was running into! With this Margolus neighborhood approach, how do you handle individual interactions when adding a new material? such as adding "stone" or "wood", would you have to create all possible interactions sand has with these? I'm eager to look at your code when it's available!

    • @Yusef28
      @Yusef28  3 місяці тому +1

      Good question and the answer is so far I found ways to cheat. For any static (doesn't move once placed) material like stone I just have no interactions listed. That means in a margolus neighborhood with stone in it, nothing will happen. So sand that falls on it wont be processed in frames where it's margous neighborhood has stone. Another cheat like with honey eating through wood is I just only process intereactions where there is wood and honey in the same neighborhood block and I pick a random wood cell to turn into honey in that case. So the rule set consists of just two random checks. It is hard to explain further because the data structures I use do a lot of the heavy lifting (albeit badly). I've had to step away from the code for a while but once I'm able publish on shadertoy I'll make a community post about it.

  • @apppples
    @apppples 3 місяці тому

    bro wtf, this is so fucking cool

  • @snarekeeper8053
    @snarekeeper8053 3 місяці тому +2

    I would absolutely love to read a bit through your code, is there any possibility that you could open source it?

    • @Yusef28
      @Yusef28  3 місяці тому

      Yes, I'm planning to opensource some of it I just need to organize things first. I'll make a community post about it when I do.

    • @snarekeeper8053
      @snarekeeper8053 3 місяці тому

      @@Yusef28 understandable, great thing take time. I'm absolutely hyped for the moment I can give that repo a star :D

  • @NICK....
    @NICK.... 3 місяці тому +1

    that ascii falling sands thing is amazing

  • @gwentarinokripperinolkjdsf683
    @gwentarinokripperinolkjdsf683 3 місяці тому +1

    How would you get a "velocity" to work?

    • @Yusef28
      @Yusef28  3 місяці тому

      This is a good question. It's usually done (on the cpu) but just advancing the cells more than one pixel in a given direction at a time. There it involves calculating the line of travel with something like the bresenham's line drawing algorithm. On the GPU though and with this Margolus Neighborhood technque it would have to be different. I can think of two options. Speed up the simulation of a material or a given cell (and it's cell block) by simulating it multple times in a given frame (using buffers), and slow down others by having them not move on some frames.

  • @jlopez4889
    @jlopez4889 3 місяці тому

    This is really cool. the only thing that bothered me was how chunky the water was. But other than that, it was interesting

    • @Yusef28
      @Yusef28  3 місяці тому

      Fair point. I didn't spend enough time on water for sure. One challenge is dispersion which on the CPU means sending the water cell multiple cells across in a given direction in one frame where possible. On the GPU that's more challenging.

  • @blue_birb
    @blue_birb 3 місяці тому

    Damn you I was just learning parallel computing and shaders to do something like this

    • @Yusef28
      @Yusef28  3 місяці тому

      Oh perfect timing then!

  • @aryjarvis3161
    @aryjarvis3161 2 місяці тому

    I literally had this idea in the car, just today for a project

    • @Yusef28
      @Yusef28  2 місяці тому +1

      Oh nice, I hope you make something awesome!

    • @aryjarvis3161
      @aryjarvis3161 2 місяці тому

      @@Yusef28 Damn, now I have to make something lol. The initial plan was to do it with webgpu and host it in the cloud, but I'm realizing that webgpu isn't actually ready for web... but it is ready for native desktop apps. So now it's become 2 projects... porting the webgpu game of life to JS... and doing a falling sand webgpu sim in rust.

    • @Yusef28
      @Yusef28  2 місяці тому +1

      Wow, ok lot's technoogies to be familiar with for this project, sounds great!

  • @meest0
    @meest0 3 місяці тому

    Really cool, I was expecting to see the view count be around 5 digits not 3

  • @JavaScripting64
    @JavaScripting64 3 місяці тому

    Sand rules!!

  • @jaydeep-p
    @jaydeep-p 3 місяці тому

    Damn, people are so smart. That 2x2 grid idea would never come to me.

    • @theevilcottonball
      @theevilcottonball 3 місяці тому

      maybe i would have tried a pseudorandom generator taking the uv coordinates to decide probablistically whether its falling right or left which both pixels diagonally below compute but only one/or the other diagonal is selected.

    • @Scouarn
      @Scouarn 3 місяці тому

      ​@@theevilcottonball You could also precompute the random value once for the next frame but I don't know if it's actually better

  • @zoifjsdlkfzhjfupoizn
    @zoifjsdlkfzhjfupoizn 3 місяці тому

    dang this video quality!

  • @Lluis_Bogunya
    @Lluis_Bogunya 3 місяці тому

    Really cool, i think you gave me an idea to make a video, do you have the code somewhere? I’m not much of a programmer, only a filmaker. Great video!

    • @Yusef28
      @Yusef28  3 місяці тому

      Glad to hear it! I'm planning to make some of it public soon so I'll let you know when I do.

  • @Galomortalbr
    @Galomortalbr 3 місяці тому

    my suggestions is to use arithmetic instead of branching on the GPU, would boost the performance even more

    • @Yusef28
      @Yusef28  3 місяці тому

      Oh yes I should mention my code is not an example of how to do this. It's still very rough until now and another method like you suggest could improve both perfomance and make it less of a pain to work with. I might have to pin a comment about that.

  • @sourdoughbornsourdoughbred4712
    @sourdoughbornsourdoughbred4712 3 місяці тому

    Impressive

  • @CodingBill
    @CodingBill 3 місяці тому

    I'm interested by writing some GPU's programs but i admit that there's a big mental shift to do when you're used to CPU programming and i would need a lil roadmap to know the tool and understand how it works so i could get more ideas about what to make.

    • @khlorghaal
      @khlorghaal 3 місяці тому

      just think with arrays and implicit functions; even on cpu you shouldnt be doing things like virtuals and control inversion anyways due to how they clutter and enlarge codebases

    • @Yusef28
      @Yusef28  3 місяці тому

      Ok well I always recommend thebookofshaders.com/ because it's how I first learned about shaders. There are also other youtubers like ArtofCode who has lot's of tutorials and Kishimisu has some high quality ones as well.