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!
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!!
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?
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?
@@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".
@@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
@@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.
Thanks for watching! Watch my tutorial about making a Water Shader here: ua-cam.com/video/_jcc2JOU_fE/v-deo.html
Best introduction to shaders in Gamemaker that I've found on the UA-cams, friend. Subscribed.
Thank you!!! Honestly all your tutorials are so well made and explained clearly.
You're the perfect definition of that Indian who explains stuff *so perfectly* (that's a compliment).
Take my like and sub.
Is he Indian? Never heard this accent before 😮
@@fabiosarts yeah hes a sikh
Yep, best shader explanation I've seen.
This just might be simple enough for me to actually try shaders. Thanks for the great tutorial
Alternate title: How to give Mario a Power Star
How about a multi-color gradient across a vertex buffer?
Take my like and my sub!!! Amazing video! Best explanation of shaders in GM2 out there!
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!
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
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!!
Join our Discord server, we can help you in the chat 👍
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?
The video kind of explains how tbh, just too shallow of an info
awesome video, it will be quite helpful if you can make more advanced topics, like water effects, or rain maybe.
Thanks! You can check out my Water Shader video: ua-cam.com/video/_jcc2JOU_fE/v-deo.html
Great, concise explanations. Thanks.
Thank u! Amazing tutorial man!
thank you i owe you my life
That's amazing, I've always wanted to learn about shaders.
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?
you gotta work on that accent my brother i cant understand.
The vertex shader passes info to the fragment shader. You gotta work on listening to accents my brother.
@@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".
@@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
@@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.
Great video!
Much appreciated! Liked!!
This was great!
Thank you
😱 omg!!!!
perfect
Make tutorial how make mounts
can't understand a word
Your vocal inflection is annoying and doesn't sound human.
Not everyone is native English speaker, you know?
Ah hell nah 💀
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 : ''
This was super helpful, Thankyou!