Grass wind animation using simple Shader in GODOT | Dicode

Published: 06 August 2021
on channel: 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.


Watch video Grass wind animation using simple Shader in GODOT | Dicode online without registration, duration hours minute second in high quality. This video was added by user Dicode 06 August 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 10,649 once and liked it 431 people.