Reaction hidden
This commit is contained in:
parent
f0ee075f7a
commit
d4b50bdda0
12 changed files with 189 additions and 12 deletions
25
shaders/fluid.gdshader
Normal file
25
shaders/fluid.gdshader
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
shader_type spatial;
|
||||
|
||||
render_mode cull_back, blend_mix;
|
||||
|
||||
uniform float fill: hint_range(0.0, 1.0, 0.01) = 0.;
|
||||
uniform float wave_intensity: hint_range(0.0, 1.0, 0.01) = 0.;
|
||||
|
||||
const float MAX_AMPLITUDE = 0.1;
|
||||
const float MAX_SPEED = 2.;
|
||||
|
||||
void vertex() {
|
||||
if (VERTEX.y > 0.) {
|
||||
VERTEX.y *= (fill - 0.5) * 2.;
|
||||
VERTEX.y += sin((TIME+VERTEX.x+VERTEX.z)*wave_intensity*MAX_SPEED) * MAX_AMPLITUDE * wave_intensity;
|
||||
}
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// Called for every pixel the material is visible on.
|
||||
}
|
||||
|
||||
//void light() {
|
||||
// // Called for every pixel for every light affecting the material.
|
||||
// // Uncomment to replace the default light processing function with this one.
|
||||
//}
|
||||
1
shaders/fluid.gdshader.uid
Normal file
1
shaders/fluid.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://djb4t6pw03tow
|
||||
Loading…
Add table
Add a link
Reference in a new issue