I Went on a Shader Adventure

Поделиться
HTML-код
  • Опубликовано: 5 июн 2024
  • I added a few different OpenGL/GLSL shaders to Vaegrant in an attempt to fill out the world and make the game look nicer. I think it worked!
    Music:
    Adhesive Wombat - Collection
    • AdhesiveWombat - Colle...
    Patreon (get access to Vaegrant's source code!):
    / dafluffypotato
    My Discord Server:
    / discord
    Shader Code:
    github.com/DaFluffyPotato/pyg...
    0:00 - no bosses. i cri.
    0:30 - lost in the world of shaders
    1:15 - an introduction to shaders
    1:49 - all of my shaders
    3:26 - shadows and vignette shader
    5:54 - lighting shader
    7:33 - warped background shader
    9:40 - final thoughts on shaders
    #python #pygame #shaders
  • НаукаНаука

Комментарии • 64

  • @DaFluffyPotato
    @DaFluffyPotato  Год назад +28

    Ignore my curly braces. lol

    • @snesmocha
      @snesmocha Год назад +7

      um, just a fair warning for shaders, branch prediction and if statements are generally frowned upon due to if statements tanking performance of shaders dramatically, i'd suggest simply creating the shader then creating the logic outside in cpu to prevent the gpu from being forced to do if statement stuff

    • @DaFluffyPotato
      @DaFluffyPotato  Год назад +8

      Since my games are pixel art, branch statements aren’t a concern. I can write a ton of spaghetti and get away with it due to the low fragment count.

    • @snesmocha
      @snesmocha Год назад +3

      @@DaFluffyPotato ah, I see, although just be careful of that in the future if you make more complex shaders, I remember this one time on a pixel art game that this stupid shader brought performance down nearly 30% from my garbage code lol

    • @yaazarai
      @yaazarai Год назад +2

      @@DaFluffyPotato for future reference. For your "baseColor," if statements you can just do "baseColor += texture2D(...).a" and after all of the direction checks just do: baseColor = vec4(...) * sign(baseColor). No branches, simplified code.

    • @NILLANEAB
      @NILLANEAB 11 месяцев назад +1

      consider your braces ignored 😂

  • @notdouglas1966
    @notdouglas1966 Год назад +66

    smart guy talks about complicated stuff way over my head for 10 minutes

    • @somebody31415
      @somebody31415 Год назад +12

      Listen to the smart people that talk about complicated things that you don’t understand as much as you can! After a little while, you will understand! Sometimes, you should try doing the things that you don’t understand because it’s something that you aren’t comfortable with and that is exactly where learning happens!

    • @somebody31415
      @somebody31415 Год назад +6

      To be honest, I don’t really understand this either… and I’m absolutely not taking down to you! It’s more like I’m giving myself a pep talk by saying it to you

    • @duckle3152
      @duckle3152 Год назад +2

      @@somebody31415 I like the way you think

    • @russkydeutsch
      @russkydeutsch Год назад +1

      @@somebody31415 got a question for you. I'm learning programming (python, and now JS).
      I'm not an expert, only a beginner. I wanted to ask you about how you gain knowledge in programming:
      Is there a bad way to learn things? More specifically: I don't know any of the things DFP talks about, but I feel like I'm cheating if I learn to do something in programming that I didn't teach myself. Does that make sense?

    • @somebody31415
      @somebody31415 Год назад

      @@russkydeutsch I’m not sure if I am the person who you should ask, I am anything but an expert. My programming knowledge is a combination of a few college courses and a lot of messing around on my own and teaching myself.
      At the best, it’s a quilt I have crafted mostly on my own. At the worst, it’s an idiot mostly bumbling about and groping in the dark.

  • @kingdev8688
    @kingdev8688 Год назад +21

    The polish in this game is already crazy, can't wait to see what the game will look like finished

  • @petthepotat
    @petthepotat Год назад +8

    wowie its sSHADEARS!!!!
    1. dat screenshake be saucy
    2. dat ability be kinda saucy
    3. shaders are most saucy
    4. shaders r yummy
    5. dat pygame opengl module is quite saucy
    love your content! you've been a great inspiration!!!
    next up: I implemented ray tracing? XD

  • @skysurfer_kon1641
    @skysurfer_kon1641 Год назад +9

    You were actually the inspiration to the pygame community to start on shaders. Because of you, lots of people are adding their own documentation and implementations of shaders in pygame. I also think that perhaps you could use a normal blur shader for the bloom as the lens flare looks a bit dirty/smudged... it's nice to test, but I think the normal bloom has a cleanness to it.
    Really hope you add documentation or the frag/vert code someday!

  • @AngelGonzalez-yy8dh
    @AngelGonzalez-yy8dh Год назад +7

    This guy is the reason why I know how to make games now

  • @SpacEagle17
    @SpacEagle17 Год назад +1

    Great video. Your background shader gave me some inspiration for my own project. Shaders are fun

  • @CarloObrad
    @CarloObrad Год назад +1

    hi man ive been watching since ur tutorials and im happy to see that ur channel has grown big time, hope u get to 50k soon

  • @Simon-ik1kb
    @Simon-ik1kb Год назад +2

    because of this guy I got back to python after a long time. I published couple games with Unity, made even some decent money from them. But I never enjoyed the process with engines like Unity. So now Im learning Pygame :D Not planning anything serious, just enjoying the process so much! Love this channel.

  • @mantiz192
    @mantiz192 Год назад +1

    Everything looks great. I'm a huge fan of the blur and how it looks currently. However, I feel as if the background effect may be too busy and distracting. I find it hard to visually separate the foreground objects from the background. At 7:40 the roof structure and some of the foreground platforms can he lost to the background. I do like the shapes of the background, but I think the lighter colours of it need to be changed or maybe increase the overall size of the noise. Altogether though, I love the look, I just think the background needs some changes.

  • @ContagiousIP
    @ContagiousIP Год назад

    DFP, I can’t help but to congratulate you on how brilliant you are. I’m almost out of college, and I used to program religiously in python but lost the motivation a couple years ago. Recently I decided to commit and make my own game, and I stumbled upon your older videos which have helped so much. When I was in my teens I wanted so bad to grasp concepts of programming but couldn’t find any direction or passion, so I waited until I was in college. To be so talented is something I can only dream of. I hope you continue your game dev journey because you’re awesome, dude.

  • @Schnief
    @Schnief Год назад

    You're incredibly inspiring. please keep up the great work!

  • @LookiePookie
    @LookiePookie Год назад +3

    great video!

  • @glitchedpixelscriticaldamage
    @glitchedpixelscriticaldamage Год назад

    A true passionate man. GZ 2 U!

  • @fablefallen
    @fablefallen Год назад

    Not gonna lie since I'm new to all this stuff I find myself just watching you explain things that go over my head and show code that I just nod pretending that I have some idea what I'm looking at 😁

  • @somebody31415
    @somebody31415 Год назад +2

    I’ve just recently started programming again and I appreciate the tutorials! I’m wondering if you would consider a really nerdy video tutorial on best practices for people who are not infants, but are also not wizards? Maybe something for those of us that have a lot to learn, but don’t want to ever take another college class again even if it kills them?

    • @DaFluffyPotato
      @DaFluffyPotato  Год назад +1

      I’m still learning “best practices”. I may make a video about structuring games at some point though.

    • @somebody31415
      @somebody31415 Год назад

      @@DaFluffyPotato Trust me, you know way more about best practices than I do! I came to programming through other venues, the physics and math professors are not interested in teaching you how to program, they just want you to make the computer solve the problem! I did have a couple of good professors who were interested in programming techniques, but most just said use Maple or Mathematica

    • @somebody31415
      @somebody31415 Год назад

      Maybe something on better practices would be the order of the day?

  • @smellyfrog2463
    @smellyfrog2463 Год назад +2

    hype

  • @graphicscode850
    @graphicscode850 Год назад +2

    the day this game will finally release is the day that geometry dash 2.2 will release

    • @ZgavY
      @ZgavY Год назад

      Nah, even though this is impressive, GD Shaders are more complex than this

  • @JumpCatStudio102
    @JumpCatStudio102 Год назад

    The if else in shader can be turned in to step/smoothstep function. It is better for shader and looks to me it will handle what you want just fine.

  • @lupusnupus4887
    @lupusnupus4887 Год назад +1

    How is this not viral yet

  • @asterix...
    @asterix... Год назад

    Hey I really hope I can get your attention because there's something that I really don't get how you did, in your platformer with the sword how did you make the slashing? How did you do the collisions, I really want to learn to code stuff like that I just don't get it.

    • @DaFluffyPotato
      @DaFluffyPotato  Год назад

      Animations and masks

    • @asterix...
      @asterix... Год назад

      @@DaFluffyPotato Thanks I'll check out your masks video

  • @themathforyou
    @themathforyou Год назад

    Wait a sec, if the gpu is idle (in means of calculations), does that mean I could use that to handle trig functions (like atan2) instead of using the cpu

  • @Kapcpa
    @Kapcpa Год назад +1

    Because of your first shader video i went on a quite a shader journey myself, learned alot of opengl and write my own version of your "opengl x pygame" engine, so thanks a lot because i probably wouldnt do any of that stuff

  • @tuhkiscgibin6627
    @tuhkiscgibin6627 Год назад +1

    We have sharerinos baby!

  • @yasser7077
    @yasser7077 Год назад

    can you pls show us how u convert your games to executables

  • @kunsterman
    @kunsterman Год назад

    Buddy, please don't stop of creating videos never. Pygame is real thanks to you. My humble opinion.

  • @badgraphix9659
    @badgraphix9659 Год назад +1

    I see a lot of if and else statements in your shader code. Might wanna remove these because they can impact performance sometimes. Maybe the compiler removes these branches, but I would get rid of them manually to be sure.

  • @freaper2048
    @freaper2048 Год назад

    3:39, if-conditional branching is not inheritably bad but is slow and dumbs performance. There's a guide by theorangeducks that avoids shader conditionals. Helpfully this helps; I can't post links otherwise RUclips deletes them

  • @boxhead-zk7sn
    @boxhead-zk7sn 4 месяца назад

    Pls can you point on any example or documentary on pygame and shader

  • @papafranku5780
    @papafranku5780 Год назад

    Hello, wh doy do u use numbers for the color and not just rgb?

    • @simonmaracine4721
      @simonmaracine4721 Год назад

      OpenGL deals with colors in RGBA as usual, but in the range 0.0-1.0 (floats) instead of 0-255 (integers).

  • @walkingpuppy3282
    @walkingpuppy3282 Год назад +1

    When you gonna make a tutorial that covers shaders and opengl

  • @abrarmasumabir3809
    @abrarmasumabir3809 Год назад

    Where can I learn game physics? Please recommend me something.

  • @desenhonopapel6931
    @desenhonopapel6931 Год назад

    10:13 That chat is pretty sus 🧐

  • @spenceabeen
    @spenceabeen Год назад +1

    Gonk!

  • @joaovictor388
    @joaovictor388 Год назад +2

    Relatable hmm commit

  • @costelinha1867
    @costelinha1867 Год назад

    I must confess that it's still weird as fuck the idea of Potato using a language that involves curly braces and semi-colons in game development. But then again, that's due to him basically becoming "The Pygame Channel" to me. And this is still related to Pygame so...

  • @arbitervildred8999
    @arbitervildred8999 Месяц назад

    everything gives errors.... not even the basic tutorial from the video, and the examples in the git repository also blow up

    • @DaFluffyPotato
      @DaFluffyPotato  Месяц назад

      It depends on versions of a bunch of different things. This wasn't supposed to be a tutorial. See my ModernGL video if you want a tutorial since that's what I use for shaders now.

    • @arbitervildred8999
      @arbitervildred8999 Месяц назад

      omg, I'm sorry. I don't know how my comment got on your video, I was watching a completely different channel. Your stuff all good

  • @farpurple
    @farpurple Год назад

    So these game is pygame????

  • @the9tailsupersaiyan
    @the9tailsupersaiyan Год назад +2

    First lol

  • @nynx8269
    @nynx8269 Год назад

    Fourth

  • @helengallagher7886
    @helengallagher7886 Год назад

    𝕡𝕣𝕠𝕞𝕠𝕤𝕞 💕