I Went on a Shader Adventure

Ғылым және технология

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 Жыл бұрын

    Ignore my curly braces. lol

  • @snesmocha

    @snesmocha

    Жыл бұрын

    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

    Жыл бұрын

    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

    Жыл бұрын

    @@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

    Жыл бұрын

    @@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 ай бұрын

    consider your braces ignored 😂

  • @notdouglas1966
    @notdouglas1966 Жыл бұрын

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

  • @somebody31415

    @somebody31415

    Жыл бұрын

    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

    Жыл бұрын

    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

    Жыл бұрын

    @@somebody31415 I like the way you think

  • @russkydeutsch

    @russkydeutsch

    Жыл бұрын

    @@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 Жыл бұрын

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

  • @skysurfer_kon1641
    @skysurfer_kon1641 Жыл бұрын

    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!

  • @petthepotat
    @petthepotat Жыл бұрын

    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

  • @AngelGonzalez-yy8dh
    @AngelGonzalez-yy8dh Жыл бұрын

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

  • @CarloObrad
    @CarloObrad Жыл бұрын

    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

  • @SpacEagle17
    @SpacEagle17 Жыл бұрын

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

  • @Simon-ik1kb
    @Simon-ik1kb Жыл бұрын

    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.

  • @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.

  • @mantiz192
    @mantiz192 Жыл бұрын

    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.

  • @Schnief
    @Schnief Жыл бұрын

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

  • @glitchedpixelscriticaldamage
    @glitchedpixelscriticaldamage Жыл бұрын

    A true passionate man. GZ 2 U!

  • @LookiePookie
    @LookiePookie Жыл бұрын

    great video!

  • @somebody31415
    @somebody31415 Жыл бұрын

    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

    Жыл бұрын

    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?

  • @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 😁

  • @smellyfrog2463
    @smellyfrog2463 Жыл бұрын

    hype

  • @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.

  • @Kapcpa
    @Kapcpa Жыл бұрын

    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

  • @lupusnupus4887
    @lupusnupus4887 Жыл бұрын

    How is this not viral yet

  • @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

  • @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

  • @yasser7077
    @yasser7077 Жыл бұрын

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

  • @badgraphix9659
    @badgraphix9659 Жыл бұрын

    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.

  • @tuhkiscgibin6627
    @tuhkiscgibin6627 Жыл бұрын

    We have sharerinos baby!

  • @graphicscode850
    @graphicscode850 Жыл бұрын

    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

  • @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 KZread deletes them

  • @desenhonopapel6931
    @desenhonopapel6931 Жыл бұрын

    10:13 That chat is pretty sus 🧐

  • @boxhead-zk7sn
    @boxhead-zk7sn4 ай бұрын

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

  • @DaFluffyPotato

    @DaFluffyPotato

    4 ай бұрын

    I have a tutorial on my channel.

  • @kunsterman
    @kunsterman Жыл бұрын

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

  • @spenceabeen
    @spenceabeen Жыл бұрын

    Gonk!

  • @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 Жыл бұрын

    When you gonna make a tutorial that covers shaders and opengl

  • @abrarmasumabir3809
    @abrarmasumabir3809 Жыл бұрын

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

  • @chigstardan7285

    @chigstardan7285

    Жыл бұрын

    Try pymunk

  • @joaovictor388
    @joaovictor388 Жыл бұрын

    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...

  • @farpurple
    @farpurple Жыл бұрын

    So these game is pygame????

  • @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

  • @the9tailsupersaiyan
    @the9tailsupersaiyan Жыл бұрын

    First lol

  • @nynx8269
    @nynx8269 Жыл бұрын

    Fourth

  • @helengallagher7886
    @helengallagher7886 Жыл бұрын

    𝕡𝕣𝕠𝕞𝕠𝕤𝕞 💕

Келесі