Grass wind animation using simple Shader in GODOT | Dicode

Опубликовано: 06 Август 2021
на канале: Dicode
10,649
431

hello everyone,
I have just started learning Shaders, and it is very difficult in the beginning but after couple of days I finally start understanding it. so I made this grass animation shader for 2D because most of the video i found is for 3D. making grass wind motion is very simple and easy to make. it is just a single line in the VERTEX function. I have also cover basics as well, so if you have no experience in shaders then also you can understand it too.
If you have question like-
1. How to create grass animation in godot ?
2. How do vertex function work in shader ?
3. how to make wind animation on grass using shader in godot ?
then you will get answer of these question by the end of the video :)
--------------------------------------------
Time stamp:
(0:00) : overview
(0:10) : shaders basics
(1:42) : grass Animation
(3:49) : some talk
--------------------------------------------
The shader code :

shader_type canvas_item;

uniform float speed = 2.0;
uniform float dis = 20.0;

void vertex(){
VERTEX.x += sin(TIME * speed) * dis * (UV.y-1.0);
}
--------------------------------------------
well thanks for watching...
Like, Subscribe and Share.


Смотрите видео Grass wind animation using simple Shader in GODOT | Dicode онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Dicode 06 Август 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 10,649 раз и оно понравилось 431 людям.