Where to learn shader language?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By genete
:warning: Old Version Published before Godot 3 was released.

I’m totally new to shader programming. I would only want to learn to use 2D shaders to apply effects to my sprites.

According to the Shading language documentation:

Godot uses a simplified shader language (almost a subset of GLSL)

What would be the better place to learn that GLSL in a totally newbie way?

:bust_in_silhouette: Reply From: Gokudomatic2


Hmmm… I think I’ve not formulated properly the question (my fault):
I’m totally new to shader programming and I’m also completely new to 3D modeling. I would like to find a place where to learn the basic of:

  1. What’s a shader? How does it work?
  2. What’s the difference between vertex, fragment and light shaders?
  3. What is the syntax of a shader code? (the meaning of each piece of code in the examples)
  4. How is the input and output defined in the code?
  5. How can I manage shader code through nodes, script, animations or externally?

genete | 2016-05-09 16:15

The link I gave you contains video that explain what’s a shader and how it works. It’s only graph shaders, but it explains the theory. You should give it a try.

Gokudomatic2 | 2016-05-09 16:22

:bust_in_silhouette: Reply From: MrMonk

hey genete, I’m in the same boat. It has taken a while only to know of what to start with.
I made a bit of progress starting from the GLSL documentation. It explains better the the Godot documentation some of the basic functions and concepts. Once you understand what a shader is and other basics. Go through this basic tutorial:
basics, it will show you how to start a shader project in Godot. Then go to the tutorial Gokudomatic2 pointed out and at the same time try to identify the same nodes in Godot (the tutorial is for Unreal engine, which seems to be more complex, but still you can find your way around).
Then reading the documentation from Godot will actually start making more sense.
You can always ask questions here or look through other questions tagged shader.
Hope this helps a bit.

:bust_in_silhouette: Reply From: genete

@Gokudomatic2: Thanks for the fast reply and the links to the videos. I would back to that link and watch the videos once I pass the barrel of the first initial doubts.

@MrMonk: Nothing like suffer the same experience to better understand the newbie frustration. Thanks for the link to the basics. It will help me to start to learn.