Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon Join the GFS Discord Server!

Godot Tutorial Series -- Shaders and Materials


In this video we start off learning how to create SpatialMaterials and apply texture maps to create modern PBR based materials.  We then move on and learn how to create shaders in Godot, both vertex and fragment shaders are covered.


The Video

Code Samples

Fragment example:

shader_type canvas_item;
void fragment() {
vec4 color = texture(TEXTURE,UV);
color.r += 0.5;
COLOR = color;
}


Vertex example:

uniform float speed = 1.0; // Standard playback speed
void vertex() {
VERTEX.x = VERTEX.x * TIME * speed;
}


Resources and Links

https://devga.me/free/3d-models-and-textures/
https://www.cc0textures.com/view.php?tex=Planks12
https://thebookofshaders.com/
https://docs.godotengine.org/en/3.0/tutorials/shading/shading_language.html
https://www.gamefromscratch.com/post/2014/05/16/OpenGL-Shader-Programming-Resources-Round-up.aspx




Back to Tutorial Series Homepage





blog comments powered by Disqus


AppGameKit Studio

See More Tutorials on DevGa.me!

Month List