Building custom fragment shaders - Flutter Build Show

Поділитися
Вставка
  • Опубліковано 31 лип 2024
  • Learn how to build a custom fragment shader, from GLSL code to the widgets that connect it to the rest of your Flutter app.
    Chapters:
    0:00 - Background of Flutter rendering
    3:43 - Writing a simple shader
    6:22 - Adding the shader to Flutter
    10:55 - Passing a color value
    12:48 - Difference between widgets and custom shaders
    14:18 - Adding a gradient to our shader
    17:51 - Handling color alpha
    19:30 - Conclusion
    Resources:
    Book of Shaders → goo.gle/3qbNVO8
    Next-gen UIs in Flutter → goo.gle/3IErjvZ
    Codelab → goo.gle/3MVQgpm
    Solid_fill.frag → goo.gle/3MA29zD
    Catch more videos → goo.gle/FlutterBuildShow
    Subscribe to Flutter! → goo.gle/FlutterYT
    #FlutterBuildShow
  • Наука та технологія

КОМЕНТАРІ • 61

  • @krtirtho
    @krtirtho 24 дні тому

    The best part of learning Flutter is definitely gaining the vast knowledge around the Graphics rendering world.
    Most of the frameworks abstracts those areas so much that they can't be modified easily or there are no docs simply.

  • @onedreamer
    @onedreamer Рік тому +47

    I'm amazed by the script and the talent behind its presentation! Salute to Craig and team! 🔥

  • @verticrow
    @verticrow Рік тому +6

    Please keep this series going! It's so insightful!

  • @IncompleteTheory
    @IncompleteTheory Рік тому +3

    This is well done and a great augmentation of the usual (also great) bite-sized shorter videos. Keep them coming! I also appreciate that there is much less than usual comedic distractions.

  • @techie052
    @techie052 10 місяців тому

    Your show really gives me some special kind of love towards flutter as it feels like the maths and tech i was mad of in college, comes together with this show as a bundle. Thanks alot.

  • @angelamidev
    @angelamidev 10 місяців тому

    Absolutely the best explication I see on shader and Flutter!!

  • @piranha1337
    @piranha1337 Рік тому +3

    We live in a time where you can watch an incredibly well made video for an incredibly specific topic.

  • @kifayatUllah712
    @kifayatUllah712 Рік тому +9

    Ma shaa Allah I'm not going to lie but this is so far the best GLSL tutorial I've ever seen. I love shaders!

  • @janklai814
    @janklai814 Рік тому

    This exposes the fundamental workings of Shaders, which helps me comprehend it better!

  • @fmorschel
    @fmorschel 11 місяців тому +2

    Great show!
    I would love to see:
    - A walkthrough on how to custom paint inside flutter effects like TextOverflow.fade in my custom text widgets like if I wanted to create an expandable comment that fades at the end of the second line and shows a button for me to expand it
    - A walkthrough on how to use MultiChildRenderObjectWidget to create an UI like VSCode editor (meaning an user changeable UI)
    - A walkthrough on how to create your own slivers (or inner scrollable widgets like TextField inner scroll)
    - A walkthrough on how to setup a long living and a short living isolate
    - Some exercises for us to test our knowledge on the things that you show.

  • @patrickbillingsley684
    @patrickbillingsley684 Рік тому

    Yes! This series is fantastic!

  • @dartneer
    @dartneer 5 місяців тому

    Crispy clear.. Thank you Craig. When you know - you know!

  • @Devorkan
    @Devorkan Рік тому

    very good explanation of an advanced topic!

  • @jointheflock
    @jointheflock Рік тому

    Loved the structure of this video! Super well-made and progressed very logically in a way that was easy to follow. It might have gone beyond the intended scope, but I would have been interested to see an example of using the ShaderBuilder widget from flutter_shaders you mentioned. Eager to dive in to shaders!

  • @mrverdant13
    @mrverdant13 Рік тому +2

    It would be amazing to deep dive in the scrollables' scroll physics!!!

  • @metaflutter7495
    @metaflutter7495 Рік тому +1

    FlutterBuildShow = gold. Great stuff!

  • @mikeshin77
    @mikeshin77 Рік тому

    Thanks a lot!

  • @huazhuliang3537
    @huazhuliang3537 Рік тому

    I'm come from twitter, thanks your work

  • @codegambit2507
    @codegambit2507 Рік тому

    This was so concise and easy to understand. Thank you

  • @budgeter4807
    @budgeter4807 Рік тому

    So I've always overrode shouldRepaint with false as a return parameter. This tutorial opened me up

  • @blazertherazer12
    @blazertherazer12 Рік тому +1

    🔥

  • @samgarg5228
    @samgarg5228 Рік тому +1

    Production & content quality is just op!!!

  • @huzhah
    @huzhah Рік тому

    Thanks it was a great video!

  • @olehhromadskyi2532
    @olehhromadskyi2532 Рік тому

    Can I use structures in shader code to aggregate some data? Does flutter support it?

  • @SkyLib
    @SkyLib 11 місяців тому

    Thanks this is amazing! How we can use Vertex Shaders with that?

  • @dovas90
    @dovas90 Рік тому

    Thank God, I wished this was up today..

    • @dovas90
      @dovas90 Рік тому

      OMG i had a cutmull-rom spline waiting for a year for this !

  • @ThePC007
    @ThePC007 Рік тому

    Can those be used in backdrop filters?

  • @dj.yacine
    @dj.yacine Рік тому +1

    Always Top 🎩

  • @tarunchaturvedi6040
    @tarunchaturvedi6040 Рік тому +1

    Awesome❤ keep going please

  • @skipmeister123
    @skipmeister123 Рік тому +4

    Oh man. GLSL is so far outside my wheelhouse, but I feel like it's important to my next steps as a Flutter developer. What about demoing some more advanced shaders, like a water drop effect? Or animating a shader?

    • @laybunzz
      @laybunzz Рік тому +2

      Shaders are fun, but I would not say they are a required skill for your average Flutter developer (which includes me)

    • @nayeemtby
      @nayeemtby Рік тому

      ​@@laybunzz Do you have any numbers on how much performance we can gain if some of the UI parts were directly implemented in shaders? Looking to create solutions with a really underpowered device.

    • @nayeemtby
      @nayeemtby Рік тому

      You won't need custom shaders for most of the typical applications. Unless you want to create a really fancy UI with too much going on.

  • @drawingmagicc
    @drawingmagicc Рік тому +1

    Very good video. Have a good weekend. Good luck.🌺🌺🌺🍀🍀🍀

  • @mjmontes2653
    @mjmontes2653 Рік тому

    🎉

  • @user-mh4sz7yu1p
    @user-mh4sz7yu1p Рік тому

    💯

  • @user-ul6dk8ny2m
    @user-ul6dk8ny2m Рік тому +4

    When you don’t use variable in your shader, then compiler delete it from code. So, app will crash when you try to launch it when uSize not in use. Just try to send color values start from 0 index.

    •  Рік тому

      This should be pinned. 👋👋👋

    • @sulavparajuli1579
      @sulavparajuli1579 10 місяців тому

      saved my life, thanks

  • @tuni7264
    @tuni7264 Рік тому

    I thought the shader compiler removes unused input variables then how the first 2 setFloat(...) calls worked ? normally, opengl(es) offers an api that returns the uniform parameter index, but i did not see any here.

    • @KrishBhanushali-cs4xk
      @KrishBhanushali-cs4xk Рік тому +1

      You are correct. The App will crash if you try to assign 4,5 if uSize is unused.

    • @tuni7264
      @tuni7264 Рік тому

      @@KrishBhanushali-cs4xk thank you for the clarification 😄

  • @zuraforreg3088
    @zuraforreg3088 Рік тому

    While these are interesting topics, please consider making more content on creating Line of Business (LOB) or CRUD apps, from start to finish, using relevant best practices and architectures. After all, most of devs work on such apps. Thanks!

  • @joelks
    @joelks Рік тому

    😍

  • @mehrozezaidi7562
    @mehrozezaidi7562 Рік тому

    👍🔥

  • @abdessalemmohellebi
    @abdessalemmohellebi Рік тому

    Gg

  • @JanM457
    @JanM457 Рік тому

    Oh sorry, I thought that this was about shady customers? I'll see myself out ...

  • @gofudgeyourselves9024
    @gofudgeyourselves9024 Рік тому +1

    Create an entire playlist for shaders

  • @ExcerionsForte
    @ExcerionsForte Рік тому +1

    Performant != high performance. Should just use high perf.

    • @twothreeoneoneseventwoonefour5
      @twothreeoneoneseventwoonefour5 Рік тому

      what do you mean? I haven't watched the video.

    • @twothreeoneoneseventwoonefour5
      @twothreeoneoneseventwoonefour5 Рік тому

      Actually I looked in the dictionary and you guys are both wrong:
      per·form·ant pərˈfôrmənt
      adjective performant
      functioning well or as expected.
      noun performant plural noun performants
      a person who performs a duty or ceremony.
      It has both meanings. Performant is perfectly fine here. Perfomant == high performance.

    • @laybunzz
      @laybunzz Рік тому +1

      Either way, the title was an error and has been updated :)

    • @ExcerionsForte
      @ExcerionsForte Рік тому

      @@twothreeoneoneseventwoonefour5 there’s plenty on the web to read on why it is not high performance

  • @davidwestwood
    @davidwestwood Рік тому

    WGSL > GLSL

  • @0x4ym4n
    @0x4ym4n Рік тому

    I wonder why Google powered product always uses Microsoft based product "vscode"

    • @dovas90
      @dovas90 Рік тому

      alternative ?

    • @0x4ym4n
      @0x4ym4n Рік тому

      @@dovas90 vscode

  • @flipside-games
    @flipside-games Рік тому +1

    really good tutorial, thanks a lot!