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 - Наука
Ignore my curly braces. lol
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
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.
@@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
@@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.
consider your braces ignored 😂
smart guy talks about complicated stuff way over my head for 10 minutes
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!
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
@@somebody31415 I like the way you think
@@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?
@@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.
The polish in this game is already crazy, can't wait to see what the game will look like finished
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
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!
This guy is the reason why I know how to make games now
Great video. Your background shader gave me some inspiration for my own project. Shaders are fun
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
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.
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.
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.
You're incredibly inspiring. please keep up the great work!
great video!
A true passionate man. GZ 2 U!
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 😁
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?
I’m still learning “best practices”. I may make a video about structuring games at some point though.
@@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
Maybe something on better practices would be the order of the day?
hype
the day this game will finally release is the day that geometry dash 2.2 will release
Nah, even though this is impressive, GD Shaders are more complex than this
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.
How is this not viral yet
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.
Animations and masks
@@DaFluffyPotato Thanks I'll check out your masks video
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
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
We have sharerinos baby!
can you pls show us how u convert your games to executables
Buddy, please don't stop of creating videos never. Pygame is real thanks to you. My humble opinion.
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.
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
Pls can you point on any example or documentary on pygame and shader
I have a tutorial on my channel.
Hello, wh doy do u use numbers for the color and not just rgb?
OpenGL deals with colors in RGBA as usual, but in the range 0.0-1.0 (floats) instead of 0-255 (integers).
When you gonna make a tutorial that covers shaders and opengl
Where can I learn game physics? Please recommend me something.
Try pymunk
10:13 That chat is pretty sus 🧐
Gonk!
Relatable hmm commit
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...
everything gives errors.... not even the basic tutorial from the video, and the examples in the git repository also blow up
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.
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
So these game is pygame????
First lol
Fourth
𝕡𝕣𝕠𝕞𝕠𝕤𝕞 💕