Crafting a Better Shader for Pixel Art Upscaling

Sdílet
Vložit
  • čas přidán 22. 07. 2024
  • In this episode, we explore a subject that was only tangentially related to my game project: rendering pixel art with anti-aliasing. Applications for this technique range from anti-aliasing for pixel-art textures in low-poly games like Minecraft, to games that primarily feature pixel art sprites in 3D environments, like Octopath Traveler. This video was submitted as an entry to the #SoME3 competition.
    Check out some extra discussion of the topics covered here over on Patreon:
    / 83276362
    Timestamps:
    00:00 The aliasing problem
    01:18 An existing solution
    01:41 Background knowledge
    02:49 First shader
    03:42 Distortion
    04:17 Box filter
    06:07 The problem
    07:12 The solution
    08:31 Final shader
    10:27 Transparency
    11:24 Gameplay
    Music:
    lofi geek - give me
    lofi geek - souls
    lofi geek - real
    lofi geek - two lifes
    lofi geek - lights
  • Věda a technologie

Komentáře • 345

  • @MercurySteel
    @MercurySteel Před rokem +449

    I didn't understand a single thing but it was fun to watch

    • @JJalmanke
      @JJalmanke Před rokem +9

      동감한다

    • @MercurySteel
      @MercurySteel Před rokem +15

      @@JJalmanke
      я не говорю по-китайски

    • @ciso
      @ciso Před rokem +11

      ​@@MercurySteel I think he he said that he agrees

    • @D01Light
      @D01Light Před rokem +7

      T'as pas tord

    • @Jlewismedia
      @Jlewismedia Před rokem +5

      ​@@ciso booga wooga ooga

  • @samuelmediani
    @samuelmediani Před rokem +329

    The quality and clarity of this video is surprising. You are both a great programmer and educator

    • @loco-ok5bi
      @loco-ok5bi Před 9 měsíci +2

      and animator

    • @X22GJP
      @X22GJP Před 7 měsíci

      Saying to somebody, "I'm surprised you did so well" is actually kinda' insulting, no matter how good the intent.

    • @t3ssel8r
      @t3ssel8r  Před 7 měsíci +8

      no harm no foul

  • @aarthificial
    @aarthificial Před rokem +310

    Fascinating video! I'm currently using the naïve method of first scaling up by the floored ratio using nearest neighbor and then scaling up the result with bilinear filtering. I need to give your method a try.

    • @t3ssel8r
      @t3ssel8r  Před rokem +133

      yo ty for the motion-canvas it made those code animations so painless (unlike almost everything else about making this video lmao)

    • @CloudPhase
      @CloudPhase Před rokem +12

      I was literally thinking about you throughout this entire video, I even considered reaching out to you about this video as I would love to see you implement something like this in your own game so this is great to hear.

    • @clankfish
      @clankfish Před rokem +15

      i mix you two guys up constantly

    • @copypaste4097
      @copypaste4097 Před rokem +1

      ​@@clankfish😂 same

    • @meme-tastic6089
      @meme-tastic6089 Před rokem

      @@t3ssel8r BROOO I WAITED FOR 2 YEARS U STILL DIDNT GIVE OUT UR 3D TO 2D ART MAKERRR. PLSS MAKE IT AVAILABLE TO BE DOWNLOADED.

  • @unconnectedatgmail
    @unconnectedatgmail Před 9 měsíci +29

    I love learning about all of the difficulties that are hiding just beneath the surface of things we encounter in everyday life. Thanks!

  • @ChillestDudeEver
    @ChillestDudeEver Před rokem +63

    After discovering this channel, I binged the content so hard. Concise explanations, logical flow through the explanations, high production quality, practical applications of concepts... These videos are just superb from both an educational and entertainment perspective. Kudos!

  • @nibbler7
    @nibbler7 Před rokem +5

    BABE WAKE UP, t3ssel8r UPLOADED A NEW VIDEO!!!

  • @snesmocha
    @snesmocha Před rokem +212

    always love a nonbullshit full explenation of a system!

    • @Jake28
      @Jake28 Před rokem +3

      explanation*

    • @snesmocha
      @snesmocha Před rokem +1

      @@Jake28 um, comments already hearted so ummmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm 💀

    • @Jake28
      @Jake28 Před rokem +6

      @@snesmocha just let people discover the correction in the replies on their own

    • @snesmocha
      @snesmocha Před 3 měsíci

      @@Jake28I return to this comment 10 months later and am just face palming rn 😂

  • @sgtreckless5183
    @sgtreckless5183 Před rokem +37

    This might have been the first complex shader video that I've seen that I was able to follow each step of. Really great vid!

  • @LordFaultier
    @LordFaultier Před rokem +24

    Your overview of these mechanics have been very helpful and pretty insightful for my own projects. You are truly brilliant! Thanks for putting out such a wonderful content :)

  • @pheelgad5455
    @pheelgad5455 Před rokem +2

    THIS GUY IS SO FREAKING SMART DAM

  • @j_smith_
    @j_smith_ Před 9 měsíci +5

    Congratulations on the #some3 win!

  • @interessts5033
    @interessts5033 Před rokem +2

    I have been watching youtube videos for about 10 years or so and this is no joke the very best one I have ever seen. The amount of work you must have put into this seems so much! Congratulations!

  • @pixelarp
    @pixelarp Před rokem +20

    Been waiting for a new upload from you! Last video was a treat! Keep it up, both your game and yout videos!!

  • @BenjaminCode
    @BenjaminCode Před rokem +5

    The amount of work you put in this video to teach us something that should be so hard to grasp is insane. As a CZcamsr myself, I see all the work there is behind this video and it makes me even more grateful.
    As usual Tim Soret's recommendations are dope.

  • @semmu93
    @semmu93 Před rokem +6

    the animations in this video are seriously jaw-dropping. such a high quality work, very easy to understand and follow, well done!

  • @capsey_
    @capsey_ Před rokem +6

    Never thought of using bilinear sampling as box average. Love your videos, they are unique that you deep dive into heavy math and technical details about niche problems while keeping it extremely approachable and entertaining! Visualizations are well made

  • @MrA6060
    @MrA6060 Před rokem +6

    Dicovered this channel with the absolutely brilliant animation with math video, and it just keeps on providing cool, informative and very well made videos

  • @warmechanic8186
    @warmechanic8186 Před rokem +1

    I've always loved how your videos explain topics in detail while making good use of visual demonstration. Where I would have been stuck on how perspective effects anti-aliasing, I understood in seconds with the warped quadrilaterals.

  • @GGCannon
    @GGCannon Před rokem +3

    Holy... I started re-watching your older videos yesterday, wondering when you'd post a new one because it had been a while and just woke up today to this *GIFT*.
    Love your content and one of my wish is to develop the skill set to do something similar to what you do.
    Thank you for the video.

  • @1ogic948
    @1ogic948 Před rokem

    I love learning about technical details like this. Excellently presented.
    Also, looks like a lot of work got done on the gameplay and such, which is looking very exciting!

  • @mischahordijk9385
    @mischahordijk9385 Před rokem +1

    Amazing vid and your game at the end looks sick, can't wait for the next update on that project. Keep up the stellar work!

  • @retro_marco3363
    @retro_marco3363 Před rokem +2

    Man, you are on some big brain stuff. Amazing results for next level pixel art!

  • @bobthedeleter
    @bobthedeleter Před rokem +2

    always a good day when this guy uploads. keep up the videos, you have a talent for explaining these concepts in such a concise way!

  • @JayFolipurba
    @JayFolipurba Před rokem

    no video in 10 months, I randomly check out this channel and here you are.
    I just realised that this is probably how all 3D texture editors work, like blender textured view and substance etc. At least it has the same effect.
    The effect it has on your game is perfect!

  • @starbi
    @starbi Před rokem

    I really appreciate the way you go into great detail about technical aspects that might not seem as important in the grand scheme of things - really perfecting them. I'm sure when this all culminates into your game, you will be able to feel that extra layer of polish. Looking forward to disecting this when I get my hands on it! Great work as always. :^)

  • @danielsiriste917
    @danielsiriste917 Před rokem +1

    Your video editing, the way how you explain things and subjects are pretty impressive. You are very talented man!

  • @AntoCharles
    @AntoCharles Před rokem

    Awesome! Always a treat when you upload! love the detail and editing that goes into these explanations. I could imagine this'll help a lot of people.

  • @OrangeJambo
    @OrangeJambo Před rokem +1

    I cant tell you how exciting it is to get another video from you! Leaving another comment after watching. :)

  • @ShiftyTheDev
    @ShiftyTheDev Před rokem +1

    Wow, this was a phenomenal video! Seeing how far your game has developed over the past few years has been great, but these explanations are something in a league of their own. Excellent job!

  • @drawnsequence
    @drawnsequence Před rokem

    I'm absolutely floored by the quality, skill, and knowledge on display here.

  • @Mefrius
    @Mefrius Před rokem

    I am so happy to see you come back! Your videos are really hard but very useful!

  • @alextheshinymonkey
    @alextheshinymonkey Před rokem

    Keep it up! Love how much your content has grown, from the twitter gifs to here, it's great

  • @thelastfaeinthewoods
    @thelastfaeinthewoods Před rokem +1

    You're back! I'm going to have to try this for one of my projects.

  • @goldyloxeg
    @goldyloxeg Před rokem

    absolutely incredible. you have a gift for this. amazing visualizations

  • @user-md4cu9iq3f
    @user-md4cu9iq3f Před 10 měsíci

    Please never stop doing this so high quality explanatory videos, I'm just amazed

  • @xlkfromsmwc
    @xlkfromsmwc Před rokem

    Wow! I made a similar implementation when trying to make multi-colored SDFs, and while I directly went with the fwidth() approach, I hadn't considered updating the uv gradients nor the sampling window!
    Also having the explanation as to why this works in the first place was amazing! Thank you so much for these videos!

  • @yannickleroy7419
    @yannickleroy7419 Před rokem

    Love how in-depth you go in these videos

  • @bigmojito1765
    @bigmojito1765 Před rokem

    This is cool! I've been stuck on working with OpenGL stencil buffers to achieve something similar to octopath, but its inspiring to see progress in this art style

  • @aloysiuskurnia7643
    @aloysiuskurnia7643 Před 8 měsíci +1

    The amount of math that goes into just 5 lines of shader code is crazy. It feels satisfying.

  • @jeffreystephens2658
    @jeffreystephens2658 Před rokem

    Excellent presentation. Very clear, very easy to understand, and absolutely zero frills. This is fantastic content.

  • @xx_Ashura_xx
    @xx_Ashura_xx Před rokem

    been watching this series since day 1 and i cant wait to see the final product i love every video

  • @alexpic9821
    @alexpic9821 Před rokem

    I really love watching your videos. Keep up the great work! Can't wait to see more.

  • @PMA_ReginaldBoscoG
    @PMA_ReginaldBoscoG Před 9 měsíci +1

    Congrats on getting the first place in Grant Sanderson' favourite 25 videos of #some3🎉

  • @Donahue9389
    @Donahue9389 Před rokem

    You are such an incredible creator and thinker. Just so deeply impressed 🙇‍♂

  • @beastbomber2316
    @beastbomber2316 Před rokem +1

    So happy you are back!

  • @GonziHere
    @GonziHere Před rokem

    That video is fully amazing, loved every second and stored as a reference.

  • @therealgamewizerd
    @therealgamewizerd Před rokem +3

    I'm probably never going to use this specific type of shader ever, but the quality of the video was so good and the production value felt so high that I feel you earned a sub regardless. Incredible video

  • @sw97058
    @sw97058 Před měsícem +1

    This was a game changer. I am working in Godot and with a simple translation this shader is working better than any other option, including heartbeasts jitter-free scaling shader. This is perfectly upscaling my 720p pixel art to 1080p.

  • @normalperson4925
    @normalperson4925 Před rokem +2

    good to see you again!

  • @AntoCharles
    @AntoCharles Před 9 měsíci

    Congrats on the golden pi creature was a nice surprise to find your video mentioned !!

  • @nameno7032
    @nameno7032 Před rokem

    God like explaination, please make more of this math related content, the transformation into fwidth is so smooth!

  • @zanarkandmusic
    @zanarkandmusic Před rokem

    I love your art style for your own game! I want to play it!

  • @justlearning1881
    @justlearning1881 Před rokem

    glad to see you dev blossom, been subbed

  • @heliusuniverse7460
    @heliusuniverse7460 Před rokem +1

    I think this will be very useful for my rendering engine. thank you for the amazing explanation

  • @veromolpa
    @veromolpa Před rokem +1

    My guy, your videos are amazingly helpful and well done

  • @Tubeytime
    @Tubeytime Před 11 měsíci +3

    As a digital artist, I understand this concept intuitively, but not mathematically. Fantastic explanation, I'm sure.

  • @ThatTrueCJ201
    @ThatTrueCJ201 Před rokem +1

    This guy is slowly teaching me math better than some of my professors. What is referred to as the deformation gradient in the video, is more generally called a Jacobian.

  • @literallyjeff
    @literallyjeff Před rokem +1

    Great video, really stellar visualizations

  • @yellowpie
    @yellowpie Před 9 měsíci

    I’m about 6 weeks into a class on graphics programming, and this video is a really neat intersection of things I totally understand and things I don’t get at all

  • @denisbryukhachev3663
    @denisbryukhachev3663 Před 8 měsíci +1

    Maaaan instant subscribe to your patreon, wish you good luck with your project!
    Don't forget to add some content before release (weapons, abilities, enemies), this beatiful game must be played by a lot of people))

  • @DarshUK1
    @DarshUK1 Před rokem

    I have no idea what you're on about but the video is weirdly relaxing and the editing is really nice. Great job

  • @gregspot9538
    @gregspot9538 Před rokem

    Wooww tu contenido me inspira mucho para contar una historia, me encanta tu crecimiento y como avanzas!

  • @BenjaminBlodgettDev
    @BenjaminBlodgettDev Před rokem

    This video was very well made! Game looks awesome too as always

  • @thygrrr
    @thygrrr Před 8 měsíci

    I've used several of these techniques, but only had an intuition. Your explanations really expanded my understanding. Your3D stuff looks absolutely stunning, and I'm considering some kind of pixelated look after switching engines from unity to Godot.

  • @AbachiriProduction
    @AbachiriProduction Před rokem +1

    bro you are amazing, your are the one that inspired me to build my game in similar style to yours . keep going bro 🖤

  • @davidrichey2034
    @davidrichey2034 Před rokem +1

    such a high quality video, love it!

  • @ersatztutor
    @ersatztutor Před rokem +1

    Awesome as always!

  • @orbatos
    @orbatos Před rokem +1

    Great approach, and easy to understand.

  • @INDABRIT
    @INDABRIT Před rokem

    Another great video. Your game looks stunning, I hope to play it someday

  • @Eleazarus07
    @Eleazarus07 Před 7 měsíci

    Yeah! I will play this game. Seeing the techniques is wonderful.

  • @Y1001
    @Y1001 Před rokem +1

    High quality work, thank you! :)

  • @BertoBeats
    @BertoBeats Před rokem

    This is unbelievably rad, great work.

  • @rorypenstock1763
    @rorypenstock1763 Před rokem +1

    Wow. Very clever, and very well-explained.

  • @dogzer
    @dogzer Před rokem +1

    It looks really good. I really like this style

  • @theDarkerSan
    @theDarkerSan Před rokem +1

    I was just thinking how to achieve that. great video

  • @astrid.5973
    @astrid.5973 Před rokem

    you make some of the best videos on game programming implementation ❤

  • @niklas5336
    @niklas5336 Před 9 měsíci +1

    This scaling method is also useful in video/image display, in particular for solving the issue of temporal aliasing. The popular video player mpv had the (simplified) version of this scaling method for 10 years, as the name “oversample”, for both scaling and frame mixing. VLC 4 has had it a few years also.

  • @MusicalSkele-
    @MusicalSkele- Před rokem +1

    omg a new video after years

  • @luckyknot
    @luckyknot Před 9 měsíci

    I would need a few lives fully dedicated to study shaders to understand this, but even if I got a 2% that's new knowledge for me. Thanks for this superb visuals presentation, and btw your game is shaping up to be a major hit, best luck sir!

  • @MeDjezze
    @MeDjezze Před rokem +1

    Great video! I'm always wondering why such basics - and by that I don't mean easy stuff, but fundamental requirements for a game engine - are not provided out of the box nowadays.

  • @ro-ce8vg
    @ro-ce8vg Před 9 měsíci

    congrats on winning in SoME3!

  • @Jay-dk6hf
    @Jay-dk6hf Před 10 měsíci

    Amazing production quality

  • @robotizar
    @robotizar Před rokem

    A new video :D Plz, make a tutorial about how to achieve this visual style. I loved it!

  • @hafl-evil4462
    @hafl-evil4462 Před rokem

    The legend has returned.

  • @FriedBacon88
    @FriedBacon88 Před 5 měsíci +2

    I love your videos. Hope everything is good on your end

  • @OrangeJambo
    @OrangeJambo Před rokem +3

    So many titles fail at this scaling issue & when im working & seeing titles come through.. it's a huge pet peeve that these studios cannot figure out what you worded so clearly.
    Great video! Glad to see this topic arise more, modern pixel genre games all need to take note.

  • @momiko934
    @momiko934 Před rokem

    Return of the king !

  • @ilikecutepeople
    @ilikecutepeople Před rokem

    Thank you for your research and passion

  • @1000orks
    @1000orks Před 7 měsíci +1

    I feel very stupid for having the same problems (for dynamic UI scaling actually) and going with the first algorithm thinking this is good enough.
    Then encountering all the problems you have adressed in your solution and now realizing I should have just watched until the end and not just vaguely remember.
    Thank you - this really helped a lot!

    • @t3ssel8r
      @t3ssel8r  Před 7 měsíci +3

      thanks! I was motivated from hearing similar struggles from several different teams (RadicalFish, Tim Soret, Aarthificial, ...) so I thought I would really cover all the details one is likely to run into when doing this.

  • @NickRoyOfficial
    @NickRoyOfficial Před rokem

    the king has returned

  • @mithrals6659
    @mithrals6659 Před rokem

    Totally great video, I can only imagine the amount of work you put into making of this!
    On a personal note I would be VERY interested in how you go about making the shader that "transforms" your 3d models into pixel art. They look incredible.

  • @sigitsatriap6505
    @sigitsatriap6505 Před 10 měsíci

    hopefully your game would release soon, would love to play it.

  • @polymauri
    @polymauri Před rokem

    Welcome back.

  • @fletchcanny717
    @fletchcanny717 Před rokem

    Thank you! I stg it is impossible to find anyone saying that you can scale pixel art to non integer resolutions! The only exceptions seem to be Casey Muratori, a shader on shader toy, shovel knight, and a video about doing it in Godot by HeartBeast, and even the Godot documentation says it can't be done! Thank you so much for the simple description!

  • @GTGTRIK
    @GTGTRIK Před rokem

    Personally, I prefer to have internal resolution set to something like 360p for that pixel KRUNCH. Just a bit annoying to make UI work.
    But that was a really cool explanation and way of thinking about the filter! Awesome video.

  • @mimisaiko
    @mimisaiko Před rokem +1

    Looking good man.

  • @crypticrunner1200
    @crypticrunner1200 Před rokem

    the king is back

  • @dottedboxguy
    @dottedboxguy Před rokem

    yooo new vid, very cool !

  • @user-ut1xf1mg3i
    @user-ut1xf1mg3i Před rokem +2

    Amazing work as usual. Your content got me really interested in shaders, rasterization, and 3D rendering in general. So much so in fact I was motivated in my linear algebra class and I'm taking the advanced class next semester in a few months. Even with all my interest though, I never understood how you got your foliage to look so good (and your game in general) and I gotta say I am extremely interested. Is there somewhere where I can find this kind of information, and if it is on your pattern I'd be more than happy to support.

  • @imrawasf
    @imrawasf Před rokem

    This video deserves more views