MARIO STAR CLASSIC AND WHITE SHINE

Hello my again 

Shine of the clasic star in mario world and shine white 

Shader code
/* 
@LURGX 2024 Mario Star
*/
shader_type canvas_item;

uniform bool white = false;
uniform float line_scale : hint_range(0, 1.5) = 0.0;    // Line strech
uniform float frequency : hint_range(0.0, 5.0) = 2;  // frequency of the Shain
uniform float alpha : hint_range(0.0, 2.0) = 1.0; //ALPHA

void fragment() {
	vec2 size = TEXTURE_PIXEL_SIZE * line_scale;
	vec2 si = TEXTURE_PIXEL_SIZE * line_scale;
	
	float outline = texture(TEXTURE, UV + vec2(-size.x, 0)).a;
	outline += texture(TEXTURE, UV + vec2(0, size.y)).a;
	outline += texture(TEXTURE, UV + vec2(size.x, 0)).a;
	outline += texture(TEXTURE, UV + vec2(0, -size.y)).a;
	outline += texture(TEXTURE, UV + vec2(-size.x, size.y)).a;
	outline += texture(TEXTURE, UV + vec2(size.x, size.y)).a;
	outline += texture(TEXTURE, UV + vec2(-size.x, -size.y)).a;
	outline += texture(TEXTURE, UV + vec2(size.x, -size.y)).a;
	outline = min(outline, 1.5);
	
	float outs = texture(TEXTURE, UV-outline).a;
	
	vec4 animated_line_color = vec4(0.5 + sin(2.0*3.14*frequency*TIME),
							   0.5 + sin(2.0*3.14*frequency*TIME + radians(120.0)),
							   0.5 + sin(2.0*3.14*frequency*TIME + radians(240.0)),
							   alpha);
	
	vec4 color = texture(TEXTURE, UV);
	vec4 c = texture(TEXTURE, TEXTURE_PIXEL_SIZE);

	if (white == true){
	COLOR = mix(c,animated_line_color+alpha, outline + color.a);
	}
	else{
	COLOR = mix(color,animated_line_color+outs, outline + color.a);
	}

}
Tags
GLES2, GLES3, outline, shine
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 lurgx

GHOST SHINE

SELECT PLAYER STYLE 80S GAME

Low life flash 2D

Related shaders

[SIG15] Mario World 1-1

white balance shader

Fog of war with alpha cut off as white color

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments