shader_type canvas_item;
uniform float glow_strength : hint_range(0.0, 5.0) = 3.0;
uniform vec4 glow_color : hint_color = vec4(1.0, 1.0, 0.0, 1.0); // Yellow color for visibility
void fragment() {
// The UV coordinates of the current fragment
vec2 uv = SCREEN_UV;
// Center of the sprite
vec2 center = vec2(0.5, 0.5);
// Compute the distance from the center
float dist = length(uv - center);
// Define glow radius and thickness
float radius = 0.5; // Radius for glow effect
float thickness = 0.05; // Thickness of the glow
// Create a smooth circle
float glow = smoothstep(radius - thickness, radius, dist) - smoothstep(radius, radius + thickness, dist);
// Apply the glow color and strength
COLOR = glow_color * glow * glow_strength;
}
shader_type canvas_item;
uniform float glow_strength : hint_range(0.0, 5.0) = 3.0;
uniform vec4 glow_color : hint_color = vec4(1.0, 1.0, 0.0, 1.0); // Yellow color for better visibility
void fragment() {
// Center the line effect
vec2 uv = SCREEN_UV;
vec2 center = vec2(0.5, 0.5);
// Compute the distance from the center
float dist = length(uv - center);
// Define line width and glow parameters
float line_width = 0.05; // Width of the line
float radius = 0.1; // Glow radius around the line
float thickness = 0.02; // Thickness of the glow
// Check if the current fragment is within the line width
float line = smoothstep(line_width - thickness, line_width, dist) - smoothstep(line_width, line_width + thickness, dist);
// Apply the glow color and strength
COLOR = glow_color * line * glow_strength;
}
i fixed this too but i want to make an effect like my start is giving light but now i understand that with neon effect i cant because its looks like this
Hi i just found video on youtube about this https://www.youtube.com/watch?v=14X_2WYZvRI and thats what i need but anyway thanks for that shaders information that was helpful