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;
}
Tags
beam, blackhole, blood, buble, core, electricity, frost, Magic, Shield
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from xhaya

Color shift Color Reducer post-processing

Space Background

Related shaders

Screen Space Frost, with volumetric Snow

Quick Example Fresnel Outline

Low Poly Fresnel

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments