You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
521 B
Plaintext
20 lines
521 B
Plaintext
shader_type spatial;
|
|
|
|
uniform float ANIM_SPEED = 100.0;
|
|
uniform vec4 hot_color: hint_color = vec4(.9, .9, 9., .5);
|
|
uniform vec4 cold_color: hint_color = vec4(1., 1., 1., 0.);
|
|
|
|
uniform float power = 1.;
|
|
|
|
void vertex() {
|
|
float distance = sqrt(pow(VERTEX.z, 2) + pow(VERTEX.x, 2));
|
|
VERTEX.y = min(sin(VERTEX.x * TIME * ANIM_SPEED) * power / (distance * 10. + 1.), 0.);
|
|
|
|
vec4 exhaust_color = mix(hot_color, cold_color, VERTEX.y / 5.8);
|
|
COLOR = exhaust_color;
|
|
}
|
|
|
|
void fragment() {
|
|
ALPHA = COLOR.a;
|
|
ALBEDO = COLOR.rgb;
|
|
} |