Shaders in GameMaker Studio 2 - Tutorial for Beginners

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ • 43

  • @GameMakerStation
    @GameMakerStation  5 років тому +2

    Thanks for watching! Watch my tutorial about making a Water Shader here: ua-cam.com/video/_jcc2JOU_fE/v-deo.html

  • @massivewon
    @massivewon 4 роки тому +13

    Best introduction to shaders in Gamemaker that I've found on the UA-cams, friend. Subscribed.

  • @michaelfebus6393
    @michaelfebus6393 2 роки тому +4

    Thank you!!! Honestly all your tutorials are so well made and explained clearly.

  • @arthurgps2441
    @arthurgps2441 4 роки тому +8

    You're the perfect definition of that Indian who explains stuff *so perfectly* (that's a compliment).
    Take my like and sub.

  • @andycarr3711
    @andycarr3711 3 роки тому +1

    Yep, best shader explanation I've seen.

  • @habarvaz
    @habarvaz 4 роки тому +1

    This just might be simple enough for me to actually try shaders. Thanks for the great tutorial

  • @charKT-7461
    @charKT-7461 4 роки тому +9

    Alternate title: How to give Mario a Power Star

  • @Ragnark1
    @Ragnark1 3 роки тому +1

    How about a multi-color gradient across a vertex buffer?

  • @cskhard
    @cskhard 4 роки тому +2

    Take my like and my sub!!! Amazing video! Best explanation of shaders in GM2 out there!

  • @Dustpetro
    @Dustpetro 7 місяців тому

    Hey! I noticed in the video that you have code completion while writing the shader. How do you enable that? I have code completion for GML and it's enabled in the settings, but not for writing shaders? Thanks in advance!

  • @jacke_RS
    @jacke_RS 10 місяців тому

    Very close to what I’m trying to do, all I need is to make the shader transparent to show the detail of the texture underneath

  • @soubakouh
    @soubakouh 4 роки тому +3

    shader_reset();
    shader_reset();
    shader_reset();
    shader_reset();
    shader_reset();
    ... after using shaders, i go to other roomss and I see ALL SCREEN in BLACK... T_T HELP PLS!!

    • @GameMakerStation
      @GameMakerStation  4 роки тому

      Join our Discord server, we can help you in the chat 👍

  • @itsybutsy
    @itsybutsy Рік тому

    This is _very_ close to what I need, I now know a lot about shaders and color alteration inside of them. This was a major help, tbh.
    Does anyone know how I could change one specific color to another? for instance, if I wanted to make one specific shade of red in my sprite into a specific shade of green, how would I do that?

    • @salvadorgonzales1
      @salvadorgonzales1 11 місяців тому

      The video kind of explains how tbh, just too shallow of an info

  • @MartinGerardoLira
    @MartinGerardoLira 5 років тому +1

    awesome video, it will be quite helpful if you can make more advanced topics, like water effects, or rain maybe.

    • @GameMakerStation
      @GameMakerStation  5 років тому

      Thanks! You can check out my Water Shader video: ua-cam.com/video/_jcc2JOU_fE/v-deo.html

  • @Hectorlph
    @Hectorlph 3 роки тому

    Great, concise explanations. Thanks.

  • @carlitos5336
    @carlitos5336 4 роки тому

    Thank u! Amazing tutorial man!

  • @plagueparchments
    @plagueparchments 9 місяців тому

    thank you i owe you my life

  • @maurosergio6734
    @maurosergio6734 5 років тому +1

    That's amazing, I've always wanted to learn about shaders.

  • @SonictheHedgehogInRealLife
    @SonictheHedgehogInRealLife 4 роки тому +1

    2:03 - 2:04 I have no idea what word you said I cant understand it... you said he varying variables What? to the fragment shader??? What was that word?

    • @SonictheHedgehogInRealLife
      @SonictheHedgehogInRealLife 4 роки тому +1

      you gotta work on that accent my brother i cant understand.

    • @GameMakerStation
      @GameMakerStation  4 роки тому +7

      The vertex shader passes info to the fragment shader. You gotta work on listening to accents my brother.

    • @SonictheHedgehogInRealLife
      @SonictheHedgehogInRealLife 4 роки тому +2

      @@GameMakerStation Im sorry but do you have to speak that exact way its kinda weird? its like you're talking that strange way on purpose like the way you pase your words. I get it though that might get you a lot of views but its kinda annoying to me personally when i try to listen i just think to myself "omg is he going to talk like that the whole time".

    • @GameMakerStation
      @GameMakerStation  4 роки тому +2

      @@SonictheHedgehogInRealLife Please watch my latest video before judging how I speak. There's nothing I can do about how I used to talk 9 months ago :P

    • @ejjame393
      @ejjame393 4 роки тому +11

      @@SonictheHedgehogInRealLife It's really not fair, it's not like he tries to annoy you, he literally made this video so people like us could learn something. Have some respect man.

  • @AiguretDuren
    @AiguretDuren 4 роки тому

    Great video!

  • @mythology100
    @mythology100 5 років тому

    Much appreciated! Liked!!

  • @odinmagick
    @odinmagick 5 років тому

    This was great!

  • @devdiary7978
    @devdiary7978 5 років тому +1

    Thank you

  • @martingonzalez4370
    @martingonzalez4370 2 роки тому

    😱 omg!!!!

  • @allbaloogroup6435
    @allbaloogroup6435 4 роки тому

    perfect

  • @xnyarlx
    @xnyarlx 3 роки тому

    Make tutorial how make mounts

  • @ty88
    @ty88 10 місяців тому

    can't understand a word

  • @jakeq3530
    @jakeq3530 3 роки тому +2

    Your vocal inflection is annoying and doesn't sound human.

    • @Singleraxis
      @Singleraxis 3 роки тому +2

      Not everyone is native English speaker, you know?

    • @thenoseguy
      @thenoseguy Рік тому

      Ah hell nah 💀

  • @PrimitiveAspid
    @PrimitiveAspid 2 роки тому

    Mine doesn't work. i think its the same as yours
    SHADER0.vsh
    //
    // Simple passthrough vertex shader
    //
    attribute vec3 in_Position; // (x,y,z)
    //attribute vec3 in_Normal; // (x,y,z) unused in this shader.
    attribute vec4 in_Colour; // (r,g,b,a)
    attribute vec2 in_TextureCoord; // (u,v)
    varying vec2 v_vTexcoord;
    varying vec4 v_vColour;
    void main()
    {
    vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
    gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
    v_vColour = in_Colour;
    v_vTexcoord = in_TextureCoord;
    }
    SHADER0.fsh
    //
    // Simple passthrough fragment shader
    //
    varying vec2 v_vTexcoord;
    varying vec4 v_vColour;
    uniform float add;
    uniform float time;
    vec3 hsv2rgb(vec3 c) {
    vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
    vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
    return c.z * mix(K.xxx, clamp(p - k.xxx, 0.0, 1.0,), c.y);
    }
    void main()
    {
    gl_FragColor = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord );
    gl_FragColor.rgb = hsv2grgb(vec3(time, 1, 1));
    }
    COMPILE ERRORS
    Fragment Shader: RGB at line 13 : 'k'
    Fragment Shader: RGB at line 13 : 'xxx'
    Fragment Shader: RGB at line 13 : ''

  • @retrowillgames9443
    @retrowillgames9443 2 роки тому

    This was super helpful, Thankyou!