Glowing shield/beam/buble/magic/frost Fresnel
https://godotshaders.com/snippet/fresnel/
fresnel shader with noise shield/beam/buble/magic/frost/electric/blackhole/core/blood any many things
mostly taken from here. I just added displacement and more colors. there is tons of these effects so i made my version.
Play with the values can be made anything that is sphere (img 3)
fixed displacement issue
Shader code
shader_type spatial;
render_mode unshaded, cull_disabled, world_vertex_coords;
uniform vec3 Color: source_color;
uniform vec3 glow_color: source_color;
uniform float dist;
uniform float speed;
uniform float glow_intensity;
uniform float glow_amount;
uniform float posMult;
uniform sampler2D noise: repeat_enable;
void vertex()
{
vec4 pos = texture(noise, vec2(VERTEX.x + (TIME * speed),VERTEX.y)) - vec4(0.5);
VERTEX += (pos.xyz * posMult) * NORMAL;
}
float fresnel(float amount, vec3 normal, vec3 view)
{
return pow((1.0 - clamp(dot(normalize(normal), normalize(view)), 0.0, 1.0 )), amount);
}
vec3 fresnel_glow(float amount, float intensity, vec3 color, vec3 normal, vec3 view)
{
return pow((1.0 - dot(normalize(normal), normalize(view))), amount) * color * intensity;
}
void fragment() {
vec3 glow_fresnel = fresnel_glow(glow_amount, glow_intensity, glow_color, NORMAL, VIEW);
float rimLevel = texture(noise, vec2(NORMAL.x + (TIME * speed),NORMAL.y)).r;
ALBEDO = Color + glow_fresnel * rimLevel;
float fresnel = fresnel(dist, NORMAL, VIEW);
RIM = rimLevel;
ALPHA = fresnel;
}