What Are Shaders?

  Рет қаралды 199,334

TheHappieCat

TheHappieCat

Күн бұрын

Check out Skillshare! The first 100 people to use code YTHAPPIE get free premium access for 2 months! Head to: skl.sh/TheHappieCat
Further Reading/Watching:
Toon Shader Code: rbwhitaker.wikidot.com/toon-sh...
Book of Shaders: thebookofshaders.com/01/
ShaderToy: www.shadertoy.com/new
ShaderToy Tutorial for Beginners: gamedevelopment.tutsplus.com/...
Makin' Stuff Look Good (entire KZfaq channel great at explaining shader concepts): / @danmorangamedev
Link Models in UE4, by Arnage: forums.unrealengine.com/commu...
Please let me know if you see resources owned by you in this video and I have not credited you!
Check out my Patreon, all funds go directly back to the show: / thehappiecat
Find challenges and ask questions here: / thehappiemakers
My second channel! / thehappiercat2
Follow me on Twitter: / thehappiecat
Or Facebook: / thehappiecat
Or Twitch: twitch.tv/happiecat

Пікірлер: 245
@daggawagga
@daggawagga 6 жыл бұрын
This is the best shader high level intro I've ever seen. So many introductions are either not succint or focus too much on something too specific for a intro.
@abjee1602
@abjee1602 Жыл бұрын
wow
@zes7215
@zes7215 7 ай бұрын
wr
@TehBurek
@TehBurek 6 жыл бұрын
Kudos for drawing attention to independent and parallel execution of shader code, as someone who teaches this stuff in computer graphics class, I want to stress that also. That answers many questions from people coming from "regular" CPU programming and adjusting to this, like "why can't I pass a variable to next pixel?" or "why's there no random function?", etc. Shaders are (mostly) meant to be fire-and-forget, no waiting around, no syncing with each other, otherwise the performance would crumble. This way, you can have massive parallelism, litereally thousands of real hardware threads running simultaneously, without worrying about it.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 6 жыл бұрын
Also note the difference between a real-time shading language (like GLSL) versus one for non-real-time use (e.g. OpenShadingLanguage, OSL). The latter does indeed have a random function, only it calls it “noise”. Another fun concept in OSL is that of a “material closure”. This is how you define the characteristics of the material independent of the actual lighting. For example, you have built-in closure functions for microfacet, refraction etc, which you can combine in your own arithmetic expressions, and leave it to the renderer to work out the actual lighting at each pixel.
@carterpryor3880
@carterpryor3880 6 жыл бұрын
Seeing your videos on things like this make me really want to get up and experiment! Thanks for another awesome video!
@ewaldikemann4142
@ewaldikemann4142 6 жыл бұрын
Very nice intro into a very complex theme. Even when it comes shading of objects in a 3d space with multiple light sources and various calculation techniques. I'm looking forward to the next part - thumps up!
@guiguiregismercer5720
@guiguiregismercer5720 6 жыл бұрын
Loved it, please make more video about shaders, lighting and techniques! Thanks
@delchavez
@delchavez 4 жыл бұрын
Your videos are always so enlightening. You do a great job of explaining stuff that might otherwise be very difficult to understand.
@tufekci0
@tufekci0 7 ай бұрын
Love your videos. You sum up even complex subjects so nicely. Not so nerdy and not so shallow.
@umeshkumarasamy6608
@umeshkumarasamy6608 5 жыл бұрын
Where were you all this time? I've been looking everywhere for knowledge about shade and you've shown me the light
@TheMahotizer
@TheMahotizer 4 жыл бұрын
I just discovered your channel, and I’m so happy KZfaq recommended it to me. I’m a design student in college and a lot of things that are interesting to me are jam packed into this video. I also love how you take time to explain various concepts in detail
@bocanica1
@bocanica1 6 жыл бұрын
Thank you so much! This had me exited for my next laboratory for the computer graphics course which happens to be about shaders :D
@alperhicylmaz1301
@alperhicylmaz1301 Жыл бұрын
Wow I've just discovered your channel. Your explanation is so neat and easy to understand.
@ImTheBestJamie
@ImTheBestJamie 6 жыл бұрын
Ive always liked lighting in games as far as graphics are concerned, so its interesting to learn whats actually happening. Im looking forwards to the code :)
@slowdragon4169
@slowdragon4169 6 жыл бұрын
i dont know how but you nailed the timing of publishing this video. Just in time. Like some superhero.
@massivewon
@massivewon 4 жыл бұрын
Never worked with shaders before, but this was a fantastic video. I learned a lot! Subscribed.
@NiemandKatzchen
@NiemandKatzchen 6 жыл бұрын
I wish that this video existed when I first started learning shaders, very good high level introduction and explanation.
@alirezajahanbakhsh7890
@alirezajahanbakhsh7890 4 жыл бұрын
I am so impressed by all of your videos! your have become my new my favorite! :)
@deinemamainhd
@deinemamainhd 6 жыл бұрын
Awesome. Please more videos about basics like this.
@franklynzhu6590
@franklynzhu6590 5 жыл бұрын
Thank you, this was very informative for a newbie to shaders!
@zugolf4980
@zugolf4980 5 жыл бұрын
Excellent, descriptive and concise introduction! Have a sub! :)
@BulletProofCupid7
@BulletProofCupid7 6 жыл бұрын
yay, another educational video! Looking forward to the next one :)
@lxliner
@lxliner 6 жыл бұрын
wow, just week ago started to learn shaders, and this video appears!!! waiting for another video!!!
@Slurkz
@Slurkz Жыл бұрын
Stellar explanation! Thanks a lot. 💜
@paulkyle
@paulkyle 3 жыл бұрын
That was actually helpful. Now I finally understand what shaders are 👏🔥
@allansh828
@allansh828 6 жыл бұрын
nice to see people willing to sponsor this channel
@callum5765
@callum5765 6 жыл бұрын
This is great I would be interested in knowing the differences and intro into HLSL and GLSL and how to utilize a pbr shading model based on brdf lighting (in code / the techniques not UE4 Material editor).
@zikomo8913
@zikomo8913 4 жыл бұрын
Another great channel, never knew Game Dev KZfaq has such great content, better late then never!
@AllanBrunoPetersen
@AllanBrunoPetersen 6 жыл бұрын
Excellent introduction and examples, thank you. :)
@samarthtandale9121
@samarthtandale9121 Жыл бұрын
Great Video and topic explanation 🙌🏼🔥🔥🔥⚡
@GingerAle611
@GingerAle611 3 жыл бұрын
Wow. Finally I got an understanding what is shaders. It's a piece of code, in which you put every pixel of an object, related to this shader. It makes some calculations, depends on what nodes you put inside. Then it returns a color value for these pixels, to render it on screen.
@hollaback0690
@hollaback0690 5 жыл бұрын
Best shader intro I've seen for noobs yet!!! Very helpful and thank you for simplifying the concept so we can understand the basics
@safebox36
@safebox36 6 жыл бұрын
_doing Computer Graphics assignment_ Me: The f*** is a shader? TheHappyCat: _this video_
@kingarthurthethirdthst3804
@kingarthurthethirdthst3804 6 жыл бұрын
Holy shit, literally the same thing happened to me. Just started a graphics course and by the time I hit shaders this video came out.
@Interestingworld4567
@Interestingworld4567 6 жыл бұрын
If you want to know 100% what is a SHATER. just go to the "NVIDIA" CHANNEL THEY have a better video of 2 hour explanation how a shator work.
@Collidedatoms
@Collidedatoms 6 жыл бұрын
Francisco: Would you mind posting a link to the video?
@Erlisch1337
@Erlisch1337 6 жыл бұрын
wtf is a shater/shator tho? xD
@tuxmusicman
@tuxmusicman 5 жыл бұрын
When you go through a whole Computer Graphics class without learning about shaders because your professor uses the old version of openGL . . .
@WooMaster777
@WooMaster777 6 жыл бұрын
Thank you! Thank you! Thank you! I LOVE your videos. They are super helpful!
@16rosati
@16rosati 5 жыл бұрын
Visual node based shader editors are available and they make the learning process a lot more user friendly!
@dealloc
@dealloc 6 жыл бұрын
I think it's important to distinguish between the two kinds of shaders. Namely the vertex and fragment. Where fragment shaders are done for every pixel (therefore also known as a pixel shader), vertex shaders are done on every vertex. The order of the shaders are also key; Fragment shaders are applied _after_ Vertex shaders. So in this video the pixel shading (colors changing) are fragment shaders, whereas cell shading (toon shading) uses vertex shading, since they have to extrude from the model in order to make the outline around the models. The color of the outline are then applied by the fragment shader.
@NeoShameMan
@NeoShameMan 6 жыл бұрын
ui_wizard Wind waker don't have outline, borderland do it as a (fragment) post process, and okami just use a reverse shell since ps2 don't have shader... It's not always vertex like afro samurai, which push the second pass vertex along the normal by flattening it in the view direction.
@Blendedasian
@Blendedasian 6 жыл бұрын
ui_wizard the technique you mentioned uses the vertex shader to upscale a pitch black copy of the model that stays right behind the normally drawn one like a bigger shadow. But this was used mostly in earlier games because it was cheap in processing power. The newer installments use one or a combination of the 2 techniques: - Interpolate normals from vertex shader and set any pixel with angle over a certain threshold to pitch black using fragment shader - Edge detect using sobel/laplace/whatever algorithm you prefer and overlay as a post processing effect on fragment shader. I also remember someone mentioning in forums a technique where a depth-map (z values) of the screen was edge-detected and overlayed to the render to make the lines.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 6 жыл бұрын
There are more than two kinds.
@clodgozon3968
@clodgozon3968 5 жыл бұрын
Well, there are more than that, but fragment and vertex shaders are often used than those aren't mentioned.
@vijaiharihar9410
@vijaiharihar9410 Жыл бұрын
Great explanation!
@NOF4C3
@NOF4C3 6 жыл бұрын
Hey you are really good at explaining things that even us non programmer understand a bit 👏👏👏👏 and can I ask can you make something about rigid bodies ?
@ddud4966
@ddud4966 6 жыл бұрын
I always wish Photoshop had a shader language like Maya Hypershader except for 2D layers, that would be so powerful compared to their fixed blending options.
@Retrofire-47
@Retrofire-47 2 жыл бұрын
this was an awesome explanation
@ipoh1213
@ipoh1213 4 жыл бұрын
Glad to watch this.
@amanuelawoke8458
@amanuelawoke8458 Жыл бұрын
Fantastic tutorial :)
@tromino2598
@tromino2598 6 жыл бұрын
That actually makes a lot of sense. Huh. You did a good job explaining it so far. I want to see what you have to say in your future videos on the topic. :p
@parallaxis261
@parallaxis261 6 жыл бұрын
thanks! very nice explanation.
@man_vs_life
@man_vs_life 4 жыл бұрын
For a long time I had in the back of my mind just what the heck a "shader"was. Now I have some grasp of it, thank you.
@kevando_gg
@kevando_gg Жыл бұрын
SUPER HELPFUL
@Ic3q4
@Ic3q4 2 ай бұрын
awww i love the channelname omg
@Bretana
@Bretana 3 жыл бұрын
As someone that knows nothing about shaders, this was incredibly easy to understand. Thanks for this!
@paparoxo3606
@paparoxo3606 4 жыл бұрын
Amazing, thank you!
@johnhammer8668
@johnhammer8668 4 жыл бұрын
Thanks for precisely pointing out pixel shader is a function applied to all pixels which takes position as the argument and does not depend on the adjacent pixels. Are all the other shaders also depened only on the postion and does not care about the values of other entities ?
@DeadlyAlive...
@DeadlyAlive... 6 жыл бұрын
Awesome video! Thank yous!
@ulysisxtr
@ulysisxtr 6 жыл бұрын
Awesome video! I don't think it could be explained in a simpler way...
@GhislainLeblanc
@GhislainLeblanc 6 жыл бұрын
Well done!
@hafeesh
@hafeesh 6 жыл бұрын
love your videos!!
@mdjoy8037
@mdjoy8037 3 жыл бұрын
Thanks, your voice is so good
@StigDesign
@StigDesign 6 жыл бұрын
Great to see new video :D and Verry interesting :)
@oraz.
@oraz. 6 жыл бұрын
This is the best ever shader video!
@Jose-uw3rj
@Jose-uw3rj 6 жыл бұрын
Thank you very much for this video, it was pretty useful for understanding shaders. I will work on Spanish subtitles for this so I can recommend this video even to people who are not good at English :D
@freezn6287
@freezn6287 6 жыл бұрын
I know im late to this video but I would like to see how refraction shaders work! plz!
@wiigame3401
@wiigame3401 5 жыл бұрын
I'm a very young (10 years old), game developer using unity. I really enjoy your creative computer content that helps me (even though you're not using unity)when I have a question. I just wish you can upload again. :-)
@sevuszeld5015
@sevuszeld5015 2 жыл бұрын
thanks a lot doc
@ty_teynium
@ty_teynium 6 жыл бұрын
@0:26 looks like the photo from Kojima productions at Siggraph showing their decima engine. They demonstrate something similar to this.
@windowsforvista
@windowsforvista 6 жыл бұрын
Thank you!
@lagaffe91
@lagaffe91 4 жыл бұрын
Very interesting !
@nullnightsun
@nullnightsun 6 жыл бұрын
For me i make the background scene with photorealistic rendering..... the characters with npr and special effects in 2d drawings.... and its very awsome
@scapegoat079
@scapegoat079 3 жыл бұрын
"Have a happy day wherever you are" What a sweet way to sign off on a video hahaha. YOU have a happy day
@camryhsalem5139
@camryhsalem5139 3 жыл бұрын
just excellent
@THEHOUSEOFSATIO
@THEHOUSEOFSATIO 2 жыл бұрын
Thanks teacher
@lewallen1971
@lewallen1971 3 жыл бұрын
Super cool! Thanks. :)
@low-key-gamer6117
@low-key-gamer6117 3 жыл бұрын
Hi, I have Linux and somehow the Intel open source driver is not giving me the option to adjust contrast and my colours looks washed, can I use a shader with my existing X11 compositor to get more contrast?
@frankynakamoto2308
@frankynakamoto2308 6 жыл бұрын
Can you please please explain more how Swift Shader the software works and why it works so well?
@ronald111001
@ronald111001 6 жыл бұрын
I love your intellectual thought process
@birutabatuta
@birutabatuta 6 жыл бұрын
u falling in love too, Mr. Ronald57?
@farfaouamohamedamine3271
@farfaouamohamedamine3271 5 жыл бұрын
that s so good thank u
@yanivdebby9137
@yanivdebby9137 2 жыл бұрын
do you know a software that i can use to create clip (video) from open source shaders? thx
@mrfincher
@mrfincher 6 жыл бұрын
Awesome!
@VictoriaFilmsgroup
@VictoriaFilmsgroup 5 жыл бұрын
Would this shadertoy work for a full feature film color correction?
@kylenki
@kylenki 4 жыл бұрын
Thanks! :)
@blacksaturn8834
@blacksaturn8834 6 жыл бұрын
That Okami reference made me happy :3
@cris3758
@cris3758 4 жыл бұрын
HOLY SHIT THAT WAS HELPFUL! Thank you!
@schmidtzcargolbull
@schmidtzcargolbull 5 жыл бұрын
good introduction. very good even
@RoyalRiku13
@RoyalRiku13 5 жыл бұрын
Now I really want to get into graphics programming :)
@man_vs_life
@man_vs_life 4 жыл бұрын
The future asks, "Did you?"
@RoyalRiku13
@RoyalRiku13 4 жыл бұрын
@@man_vs_life Tbh no, but only cuz I'm focused on Data Analytics projects since that's my main focus. Obvious ones looking into COVID-19 atm
@abuzzedwhaler7949
@abuzzedwhaler7949 6 жыл бұрын
Damn, I'm a CG artist, and I couldn't have said it better myself!
@onlyme0349
@onlyme0349 4 жыл бұрын
But how do you tell your gpu to add borders around your 3d models if it only has pixel information?
@bdenix1997
@bdenix1997 Жыл бұрын
doesnt ddx ddy gives you acess to the previous pixels? color in frag and vertex height in vert
@Jaba6798
@Jaba6798 5 жыл бұрын
This is a fuqqin awesome video
@bamsgian9759
@bamsgian9759 5 жыл бұрын
how could I detect specified object rather than colors? for example I want to apply water shaders, I must choose blue color bcoz the water is blue, but I won't let shaders affected to another blue color.
@23kl104
@23kl104 4 жыл бұрын
@4:09 "there is a link in the description", I see what you did there
@datt1144
@datt1144 2 жыл бұрын
So what different between shader and color grading
@robin_be
@robin_be 6 жыл бұрын
This video is more about what is a pixel shader (or fragment shader). They are the most common (I guess), but I think you should've told that there are more types of shaders than just that just to prevent confusion.
@jayat4927
@jayat4927 4 жыл бұрын
i am from india i fell in love with u ..seeing ur IT cs knowledge ..do i deserve u
@aiwuhu
@aiwuhu 4 жыл бұрын
Perv from India
@shrkwt
@shrkwt 2 жыл бұрын
That's way giving instruction to the gpu (Shaders) provide less performance as compared to the game default graphics.
@Kj16V
@Kj16V 6 жыл бұрын
Ooooh Now I understand why there was a character called "Phong" in the CGI cartoon, Reboot!
@archiethejanitor6779
@archiethejanitor6779 4 ай бұрын
so can shaders be summerized as "object surface type/properties"?
@JuaniPisula
@JuaniPisula 6 жыл бұрын
happy day for you too :D
@Cazaq
@Cazaq 4 жыл бұрын
This was a phenomenal explanation. It's a shame you didn't continue down this path, of making educational content.
@Pokemon4life-zs3dl
@Pokemon4life-zs3dl 11 ай бұрын
She would have made a killer course on computer graphics
@guiguiregismercer5720
@guiguiregismercer5720 6 жыл бұрын
Learning shaders is my next things!
@WillVRam
@WillVRam 3 жыл бұрын
What are your favorite shaders in games? and why. Thanks
@dannywei3148
@dannywei3148 6 жыл бұрын
@TheHappieCat I'm confused, Is it true that all pixels are executed all at once? because I thought each pixel is processed individually by going through the graphics pipeline (or a few in parallel, but it surely cannot be all at once can it?)
@clemdemort9613
@clemdemort9613 2 жыл бұрын
Late reply but I'll answer anyways, I think you misunderstood what the graphics pipeline is exactly (and that's ok it's really a bitch!) Firstly shaders are a piece of code executed in parallel on the GPU(the video only explained "fragment shaders", there are a few others) they are "steps" in the graphics pipeline and each step transfers the data it has computed to the next step, hence each pixel doesn't go through the graphics pipeline but rather pixel shaders go though each pixel then send the computed data over to the next step, therefore you could stack pixel shaders if you wanted. Moreover It IS true that each pixel is calculated simultaneously in a shader since the GPU works by doing calculations in parallel (rather than linearly on the CPU) otherwise going through each pixel one at a time would take Ages haha!
@Petch85
@Petch85 Жыл бұрын
I miss this channel
@dimifisher7942
@dimifisher7942 3 жыл бұрын
I think is what curves and filters is in photoshop
@iisthphir
@iisthphir 5 жыл бұрын
Was expecting ASCI art Link in description or something 🙁
@8cyl6speed
@8cyl6speed 9 ай бұрын
Where is pt2
Introduction to shaders: Learn the basics!
34:50
Barney Codes
Рет қаралды 305 М.
How Game Engines Work!
8:22
TheHappieCat
Рет қаралды 2 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 105 МЛН
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 20 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 76 МЛН
What Is A Graphics Programmer?
30:21
Acerola
Рет қаралды 398 М.
Textures vs Materials Vs Shaders: What you Need to Know!
12:54
InspirationTuts
Рет қаралды 8 М.
I Made Minecraft Shaders
22:48
Acerola
Рет қаралды 120 М.
How Rendering Graphics Works in Games!
6:25
TheHappieCat
Рет қаралды 744 М.
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 945 М.
The Shading Lesson That Made My Art Career Possible
14:39
Marco Bucci
Рет қаралды 496 М.
How Lighting (Basically) Works in Games
8:32
TheHappieCat
Рет қаралды 81 М.
Why Games Have Stutters | Shader Compilation
10:22
My Computer
Рет қаралды 13 М.
Roadmap to becoming a gamedev in 2024
20:56
BiteMe Games
Рет қаралды 141 М.
I Made a Graphics Engine (again)
8:27
Zyger
Рет қаралды 163 М.
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 8 МЛН
ВАЖНО! Не проверяйте на своем iPhone после установки на экран!
0:19
ГЛАЗУРЬ СТЕКЛО для iPhone и аксессуары OTU
Рет қаралды 6 МЛН
Лазер против камеры смартфона
1:01
NEWTONLABS
Рет қаралды 660 М.