From c8d0ac802aca9928028bda0d42717e49b9197d07 Mon Sep 17 00:00:00 2001 From: Peery Date: Mon, 9 Jan 2023 18:06:44 +0100 Subject: [PATCH] Missile Exhaust Shader as a file Separated the missile exhaust shader into an own file --- scenes/entities/missiles/missile_exhaust.gdshader | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scenes/entities/missiles/missile_exhaust.gdshader b/scenes/entities/missiles/missile_exhaust.gdshader index 795611e..63a5b56 100644 --- a/scenes/entities/missiles/missile_exhaust.gdshader +++ b/scenes/entities/missiles/missile_exhaust.gdshader @@ -1,20 +1,19 @@ shader_type spatial; +render_mode unshaded; 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.); + VERTEX.y = min(sin(VERTEX.x * TIME * ANIM_SPEED) * power / (distance * 10. + 2.), 0.); - vec4 exhaust_color = mix(hot_color, cold_color, VERTEX.y / 5.8); - COLOR = exhaust_color; + //vec4 exhaust_color = mix(hot_color, cold_color, .5); + COLOR = vec4(.6, .8, 1., 1.0); } void fragment() { - ALPHA = COLOR.a; + //ALPHA = COLOR.a; ALBEDO = COLOR.rgb; } \ No newline at end of file