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.
@abjee16022 жыл бұрын
wow
@zes721511 ай бұрын
wr
@TehBurek7 жыл бұрын
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.
@lawrencedoliveiro91047 жыл бұрын
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.
@dealloc7 жыл бұрын
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.
@NeoShameMan7 жыл бұрын
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.
@Blendedasian7 жыл бұрын
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.
@lawrencedoliveiro91047 жыл бұрын
There are more than two kinds.
@clodgozon39685 жыл бұрын
Well, there are more than that, but fragment and vertex shaders are often used than those aren't mentioned.
@zoriiginalx75443 ай бұрын
I would like to say that fragment shaders can be done multiple times per pixel in the cases where there’s transparency (so the same pixel can have multiple geometric fragments it needs to do processing on) or if whatever reason your GPU decides to do depth tests after the fragment shader has finished running instead of directly after rasterization. Thus, making the word ‘fragment’ in fragment shader a more reasonable and appropriate naming than pixel shader IMO
@flake838224 күн бұрын
You have an amazing way with words! Easy, EASY to align my thought process with what you're saying. I specifically thought the word "Bucket" and you said it less than 2 seconds later.
@GingerAle6113 жыл бұрын
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.
@ImTheBestJamie7 жыл бұрын
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 :)
@umeshkumarasamy66085 жыл бұрын
Where were you all this time? I've been looking everywhere for knowledge about shade and you've shown me the light
@slowdragon41697 жыл бұрын
i dont know how but you nailed the timing of publishing this video. Just in time. Like some superhero.
@16rosati5 жыл бұрын
Visual node based shader editors are available and they make the learning process a lot more user friendly!
@johnhammer86684 жыл бұрын
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 ?
@ewaldikemann41427 жыл бұрын
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!
@yuliyasherstyuk8425 жыл бұрын
43 people are from Australia and clicked thumbs up, but it came out upside down
@allansh8287 жыл бұрын
nice to see people willing to sponsor this channel
@NiemandKatzchen7 жыл бұрын
I wish that this video existed when I first started learning shaders, very good high level introduction and explanation.
@tufekci011 ай бұрын
Love your videos. You sum up even complex subjects so nicely. Not so nerdy and not so shallow.
@paulkyle3 жыл бұрын
That was actually helpful. Now I finally understand what shaders are 👏🔥
@ddud49667 жыл бұрын
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.
@carterpryor38807 жыл бұрын
Seeing your videos on things like this make me really want to get up and experiment! Thanks for another awesome video!
@safebox367 жыл бұрын
_doing Computer Graphics assignment_ Me: The f*** is a shader? TheHappyCat: _this video_
@kingarthurthethirdthst38047 жыл бұрын
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.
@Interestingworld45677 жыл бұрын
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.
@Collidedatoms7 жыл бұрын
Francisco: Would you mind posting a link to the video?
@Erlisch13376 жыл бұрын
wtf is a shater/shator tho? xD
@tuxmusicman6 жыл бұрын
When you go through a whole Computer Graphics class without learning about shaders because your professor uses the old version of openGL . . .
@scapegoat0793 жыл бұрын
"Have a happy day wherever you are" What a sweet way to sign off on a video hahaha. YOU have a happy day
@man_vs_life4 жыл бұрын
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.
@massivewon4 жыл бұрын
Never worked with shaders before, but this was a fantastic video. I learned a lot! Subscribed.
@guiguiregismercer57207 жыл бұрын
Loved it, please make more video about shaders, lighting and techniques! Thanks
@TheMahotizer4 жыл бұрын
I just discovered your channel, and I’m so happy KZbin 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
@wiigame34015 жыл бұрын
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. :-)
@23kl1045 жыл бұрын
@4:09 "there is a link in the description", I see what you did there
@Bretana3 жыл бұрын
As someone that knows nothing about shaders, this was incredibly easy to understand. Thanks for this!
@alperhicylmaz1301 Жыл бұрын
Wow I've just discovered your channel. Your explanation is so neat and easy to understand.
@Slurkz2 жыл бұрын
Stellar explanation! Thanks a lot. 💜
@delchavez4 жыл бұрын
Your videos are always so enlightening. You do a great job of explaining stuff that might otherwise be very difficult to understand.
@bocanica17 жыл бұрын
Thank you so much! This had me exited for my next laboratory for the computer graphics course which happens to be about shaders :D
@RoyalRiku136 жыл бұрын
Now I really want to get into graphics programming :)
@man_vs_life4 жыл бұрын
The future asks, "Did you?"
@RoyalRiku134 жыл бұрын
@@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
@ronald1110017 жыл бұрын
I love your intellectual thought process
@BbXxQQ7 жыл бұрын
u falling in love too, Mr. Ronald57?
@nullnightsun6 жыл бұрын
For me i make the background scene with photorealistic rendering..... the characters with npr and special effects in 2d drawings.... and its very awsome
@low-key-gamer61173 жыл бұрын
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?
@callum57657 жыл бұрын
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).
@robin_be7 жыл бұрын
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.
@ty_teynium7 жыл бұрын
@0:26 looks like the photo from Kojima productions at Siggraph showing their decima engine. They demonstrate something similar to this.
@deinemamainhd7 жыл бұрын
Awesome. Please more videos about basics like this.
@Cloroqx4 жыл бұрын
This was a phenomenal explanation. It's a shame you didn't continue down this path, of making educational content.
@Pokemon4life-zs3dl Жыл бұрын
She would have made a killer course on computer graphics
@Kj16V7 жыл бұрын
Ooooh Now I understand why there was a character called "Phong" in the CGI cartoon, Reboot!
@zikomo89134 жыл бұрын
Another great channel, never knew Game Dev KZbin has such great content, better late then never!
@freezn62877 жыл бұрын
I know im late to this video but I would like to see how refraction shaders work! plz!
@ipoh12134 жыл бұрын
Glad to watch this.
@lxliner7 жыл бұрын
wow, just week ago started to learn shaders, and this video appears!!! waiting for another video!!!
@shrkwt3 жыл бұрын
That's way giving instruction to the gpu (Shaders) provide less performance as compared to the game default graphics.
@ulysisxtr7 жыл бұрын
Awesome video! I don't think it could be explained in a simpler way...
@Retrofire-473 жыл бұрын
this was an awesome explanation
@oraz.6 жыл бұрын
This is the best ever shader video!
@NOF4C37 жыл бұрын
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 ?
@Jose-uw3rj7 жыл бұрын
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
@zugolf49805 жыл бұрын
Excellent, descriptive and concise introduction! Have a sub! :)
@jayat49274 жыл бұрын
i am from india i fell in love with u ..seeing ur IT cs knowledge ..do i deserve u
@aiwuhu4 жыл бұрын
Perv from India
@tromino25987 жыл бұрын
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
@abuzzedwhaler79496 жыл бұрын
Damn, I'm a CG artist, and I couldn't have said it better myself!
@franklynzhu65906 жыл бұрын
Thank you, this was very informative for a newbie to shaders!
@mdjoy80373 жыл бұрын
Thanks, your voice is so good
@thoomhy7 жыл бұрын
For the checkerboard code, you can just do: If( x+y%2==0) { Black(); }else{ white(); } At 2:04 You don't need all those conditions.
@NeoShameMan7 жыл бұрын
Tom l Assignments do it without If because GPU don't like, hint exploit the modulo, an add and a mul, remember what multiplying by zero do.
@oahda7 жыл бұрын
col.rgb = (x + y) % 2; 🐱
@NeoShameMan7 жыл бұрын
Ava Skoog try (x^y)&1, since you are more advanced
@oahda7 жыл бұрын
Oh, that's so clever! Because the last bit keeps alternating between 0 and 1. Really cool.
@James192p7 жыл бұрын
It's best to avoid if conditions in shaders. While modern GPUs are a lot better at handling this, they don't have an actual ALU circuitry for every cores/SMs. So basically, the GPU renders BOTH conditions, and then at the end decide which one to pick. So, for every if condition, you render twice... sometimes you don't have a choice to have an if condition, but many times they are other ways to code things to avoid them, and this is where experience comes into play. The good news, is that the web is filled with examples, and there is a lot to learn from.
@lagaffe914 жыл бұрын
Very interesting !
@alirezajahanbakhsh78904 жыл бұрын
I am so impressed by all of your videos! your have become my new my favorite! :)
@vijaiharihar94102 жыл бұрын
Great explanation!
@samarthtandale91212 жыл бұрын
Great Video and topic explanation 🙌🏼🔥🔥🔥⚡
@kevando_gg Жыл бұрын
SUPER HELPFUL
@BulletProofCupid77 жыл бұрын
yay, another educational video! Looking forward to the next one :)
@shaladddin56872 жыл бұрын
Madam, you really need to update that thumbnail. I find the thumbnail as an old, Indian tutorial-style boring video. But the video itself is sooo great, it answers all my questions. I recommend you to use some thumbnail with more colour, I think a colourful thumbnail will make it looks better and eye-catching also OMG this video is so great, its a masterpiece :D Thank you sooo much, it's really helpful to me and anyone else
@blacksaturn88347 жыл бұрын
That Okami reference made me happy :3
@guiguiregismercer57207 жыл бұрын
Learning shaders is my next things!
@AllanBrunoPetersen7 жыл бұрын
Excellent introduction and examples, thank you. :)
@ChaceBonanno Жыл бұрын
Too many games are definitely using the phong model cuz in a lot of games, things are weirdly too shiny.
@parallaxis2616 жыл бұрын
thanks! very nice explanation.
@Petch85 Жыл бұрын
I miss this channel
@sevuszeld50152 жыл бұрын
thanks a lot doc
@GhislainLeblanc7 жыл бұрын
Well done!
@amanuelawoke8458 Жыл бұрын
Fantastic tutorial :)
@WooMaster7777 жыл бұрын
Thank you! Thank you! Thank you! I LOVE your videos. They are super helpful!
@schmidtzcargolbull5 жыл бұрын
good introduction. very good even
@camryhsalem51393 жыл бұрын
just excellent
@fernwood3 жыл бұрын
I’ve been coding for 40 years and I swear, shaders make almost no sense to me. Still, this video is getting me closer to understanding. Thanks.
@clemdemort96132 жыл бұрын
It's just code executed in parallel! With compute shaders you can even choose how many different processes you want to compute at once instead of doing it on a per pixel basis
@HonsHon Жыл бұрын
Takes a bit to click for anyone. So hard after getting so used to sequential coding.
@windowsforvista7 жыл бұрын
Thank you!
@Creuilcreuil7 жыл бұрын
for the checker board pattern you could use, (x + y) % 2
@meiamsome7 жыл бұрын
Perhaps even faster: (x ^ y) & 1
@VirtualTurtleGames6 жыл бұрын
Oliver Wright I know I'm a bit late, but what does this do? The operators specifically :) I've never written/ seen this coding language before but it looks quite interesting!
@sweetberries46115 жыл бұрын
@@VirtualTurtleGames x XOR y AND 1
@frankynakamoto23087 жыл бұрын
Can you please please explain more how Swift Shader the software works and why it works so well?
@hollaback06905 жыл бұрын
Best shader intro I've seen for noobs yet!!! Very helpful and thank you for simplifying the concept so we can understand the basics
@paparoxo36064 жыл бұрын
Amazing, thank you!
@WillVRam4 жыл бұрын
What are your favorite shaders in games? and why. Thanks
@THEHOUSEOFSATIO2 жыл бұрын
Thanks teacher
@bamsgian97596 жыл бұрын
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.
@archiethejanitor67798 ай бұрын
so can shaders be summerized as "object surface type/properties"?
@bdenix1997 Жыл бұрын
doesnt ddx ddy gives you acess to the previous pixels? color in frag and vertex height in vert
@luanofortuin2067 жыл бұрын
Do you program your own shaders? and what language do you use. HLSL or GLSL?
@carterpryor38807 жыл бұрын
Luano Fortuin I don't use DirectX because the docs are useless
@whalekit65707 жыл бұрын
glsl, if you want crossplatform
@NeoShameMan7 жыл бұрын
She use CG
@luanofortuin2067 жыл бұрын
yeah the HLSL docs suck but I haven't seen good doc on GLSL too. I will be mostly creating Xbox games so I will stick to HLSL
@carterpryor38807 жыл бұрын
Luano Fortuin True, but the docs for non GLSL-related OpenGL functions (outside of shaders) are much better than DirectX docs. I think not allowing OpenGL on Xbox was one of Microsoft's worst failures.
@hafeesh7 жыл бұрын
love your videos!!
@toyodathon087 жыл бұрын
4:32 looks like a numberphile video
@dimifisher4 жыл бұрын
I think is what curves and filters is in photoshop
@DeadlyAlive...7 жыл бұрын
Awesome video! Thank yous!
@StigDesign7 жыл бұрын
Great to see new video :D and Verry interesting :)
@lewallen19713 жыл бұрын
Super cool! Thanks. :)
@datt11442 жыл бұрын
So what different between shader and color grading
@mrfincher7 жыл бұрын
Awesome!
@Anggatetapangga4 жыл бұрын
So, shader is like image filter?
@kylenki5 жыл бұрын
Thanks! :)
@oj70467 жыл бұрын
Dear. HappieCat, I was wondering if you understand what to do after an indie developer has a game or a demo of a game completed. I feel like it's more than just putting up a file on a digital distribution site like Steam besides spreading the word.