Magical Shield Shader #2

Magical Shield Shader #2 

Shader code
/*
	魔法防御シェーダー 2 by あるる(きのもと 結衣)
	Magical Shield Shader 2 by Yui Kinomoto @arlez80

	MIT License
*/

shader_type spatial;
render_mode unshaded, depth_draw_never;

uniform vec4 barrier_color : hint_color = vec4( 0.05, 1.0, 0.5, 1.0 );
uniform float barrier_force = 1.0;
uniform float barrier_interval = 50.0;
uniform float barrier_speed = 10.0;

void fragment( )
{
	vec3 v = ( CAMERA_MATRIX * vec4( VERTEX, 1.0 ) ).xyz;
	float f = sin( v.y * barrier_interval + TIME * barrier_speed );
	ALBEDO = barrier_color.rgb;
	ALPHA = clamp( ( 1.0 - dot( NORMAL, VIEW ) ) * f * barrier_force, 0.0, 1.0 );
}
Tags
Magical Shield, Shield

More from arlez80

Mountain Background Shader.

Radial Blur Shader

Procedural Burberry Check Shader

Related shaders

Magical effect Yurayura Shader

2D Hologram Shader

Half-Tone Comic Shader

The shader code and all code snippets in this post are under MIT license and can be used freely. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.
guest
0 Comments
Inline Feedbacks
View all comments